Repository Analysis

koel/koel

Music streaming solution that works.

4.9 Likely human-written View on GitHub
4.9
Adjusted Score
4.9
Raw Score
100%
Time Factor
2026-05-30
Last Push
17,153
Stars
PHP
Language
140,202
Lines of Code
2150
Files
646
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 1LOW 645

Pattern Findings

646 matches across 5 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers602 hits · 628 pts
SeverityFileLineSnippet
LOWapp/Providers/AppServiceProvider.php117 private static function enableOnDeleteCascadeForSqliteConnections(DatabaseManager $db): void
LOWapp/Providers/AppServiceProvider.php124 private static function grantAllPermissionsToSuperAdminRole(): void
LOWapp/Enums/SongStorageType.php21 public function supportsFolderStructureExtraction(): bool
LOWapp/Values/SongZipArchive.php69 private function generateZipContentFileNameFromPath(string $path): string
LOWapp/Values/SongZipArchive.php84 private static function generateRandomArchivePath(): string
LOWapp/Values/User/UserPreferences.php164 private function requirePreferenceByProperty(string $property): Preference
LOWapp/Values/SmartPlaylist/SmartPlaylistQueryModifier.php105 private static function generateEloquentParameters(string $column, Operator $operator, array $value): array|Closure
LOWapp/Repositories/SongRepository.php311 public function getManyInCollaborativeContext(array $ids, ?User $scopedUser = null): Collection
LOWapp/Repositories/UserRepository.php19 public function getOrCreateFirstAdmin(): User
LOWapp/Models/Album.php90 public static function getOrCreate(Artist $artist, ?string $name = null): static
LOWapp/Models/Artist.php104 public static function getOrCreate(User $user, ?string $name = null): self
LOW…ttp/Middleware/Concerns/ChecksControllerAttributes.php13 private static function getAttributeUsageFromRequest(Request $request, string $attributeClass): ?array
LOWapp/Http/Resources/EmbedResource.php54 private function transformEmbeddableToResource(): JsonResource
LOWapp/Helpers/Encoding/TagFixer.php53 private static function recoverFromDoubleMojibake(string $value): string
LOWapp/Services/MediaBrowser.php66 public function maybeCreateFolderStructureForSong(Song $song): void
LOWapp/Services/EmbedService.php16 public function resolveEmbedForEmbeddable(Embeddable $embeddable, User $user): Embed
LOWapp/Services/AlbumService.php59 public function trySetAlbumCoverFromDirectory(Album $album, string $directory): void
LOWapp/Services/AlbumService.php94 public function getOrCreateAlbumThumbnail(Album $album): ?string
LOWapp/Services/AlbumService.php94 public function getOrCreateAlbumThumbnail(Album $album): ?string
LOWapp/Services/DownloadService.php30 public function assertWithinDownloadLimit(
LOWapp/Services/DownloadService.php80 public function getLocalPathOrDownloadableUrl(Song $song): ?string
LOWapp/Services/SongService.php216 public function createOrUpdateSongFromScan(
LOWapp/Services/UserService.php39 public function createOrUpdateUserFromSso(SsoUser $ssoUser): User
LOWapp/Services/Playlist/PlaylistService.php141 public function removePlayablesFromPlaylist(Playlist $playlist, Collection|Playable|array $playables): void
LOWapp/Services/Playlist/PlaylistService.php146 public function makePlaylistContentPublic(Playlist $playlist): void
LOWapp/Services/License/LicenseService.php110 private function updateOrCreateLicenseFromApiResponseBody(object $body): License
LOWapp/Services/Auth/AuthenticationService.php57 public function tryResetPasswordUsingBroker(
LOWapp/Services/Auth/TokenManager.php49 public function deleteTokenByPlainTextToken(#[SensitiveParameter] string $plainTextToken): void
LOWapp/Services/Auth/TokenManager.php54 public function getUserFromPlainTextToken(#[SensitiveParameter] string $plainTextToken): ?User
LOWapp/Services/Auth/ProxyAuthService.php30 public function tryGetProxyAuthenticatedUserFromRequest(Request $request): ?User
LOWapp/Services/Transcoding/TranscodingStrategy.php18 protected function findTranscodeBySongAndBitRate(Song $song, int $bitRate): ?Transcode
LOWapp/Services/Image/ImageStorage.php57 private static function generateRandomStoragePath(string $extension = 'webp'): string
LOWapp/Services/Integrations/YouTubeService.php23 public function searchVideosRelatedToSong(Song $song, string $pageToken = ''): ?object
LOWapp/Services/Streamer/Streamer.php85 private static function hasValidFfmpegInstallation(): bool
LOWapp/Services/Scanners/WatchRecordScanner.php66 private function handleNewOrModifiedFileRecord(string $path, ScanConfiguration $config): void
LOWapp/Services/Scanners/WatchRecordScanner.php77 private function handleDeletedDirectoryRecord(string $path): void
LOWapp/Services/Scanners/WatchRecordScanner.php88 private function handleNewOrModifiedDirectoryRecord(string $path, ScanConfiguration $config): void
LOWapp/Services/Podcast/PodcastService.php207 public function unsubscribeUserFromPodcast(User $user, Podcast $podcast): void
LOW…p/Services/SongStorages/Concerns/MovesUploadedFile.php12 protected function moveUploadedFileToTemporaryLocation(UploadedFile $file): File
LOWapp/Console/Commands/InitCommand.php362 private function maybeCompileFrontEndAssets(): void
LOWapp/Console/Commands/ReleaseCommand.php87 private function acquireReleaseVersionInteractively(): string
LOWapp/Console/Commands/ReleaseCommand.php146 private static function ensureCleanWorkingDirectory(): void
LOWapp/Console/Commands/DoctorCommand.php337 private function checkDirectoryPermissions(): void
LOWapp/Console/Commands/DoctorCommand.php377 private function assertDirectoryPermissions(string $path, string $name): void
LOWresources/assets/js/utils/typeGuards.ts13export function getPlayableCollectionContentType(playables: Playable[]): Song['type'] | Episode['type'] | 'mixed' {
LOWtests/Unit/ApplicationTest.php11 public function staticUrlsWithoutCdnAreConstructedCorrectly(): void
LOWtests/Unit/ApplicationTest.php20 public function staticUrlsWithCdnAreConstructedCorrectly(): void
LOWtests/Unit/KoelPlus/Values/EmbedOptionsTest.php12 public function themeAndPreviewCanBeCustomizedForCommunityLicense(): void
LOWtests/Unit/KoelPlus/Models/UserTest.php19 public function adminCanAssignAllRolesOrderedByLevel(): void
LOWtests/Unit/KoelPlus/Models/UserTest.php32 public function managerCannotAssignAdminRole(): void
LOWtests/Unit/KoelPlus/Models/AlbumTest.php13 public function getOrCreate(): void
LOWtests/Unit/KoelPlus/Models/ArtistTest.php14 public function getOrCreate(): void
LOWtests/Unit/Enums/SongStorageTypeTest.php22 public function supportsFolderStructureExtraction(): void
LOWtests/Unit/Values/EmbedOptionsTest.php36 public function themeAndPreviewCannotBeCustomizedForCommunityLicense(): void
LOWtests/Unit/Values/EmbedOptionsTest.php47 public function invalidEncryptedResolvesIntoDefault(): void
LOW…nit/Values/User/Preferences/PreferenceBehaviorTest.php35 public function repeatModeRejectsUnknownValue(): void
LOW…nit/Values/User/Preferences/PreferenceBehaviorTest.php42 public function repeatModeAcceptsValidValues(): void
LOW…nit/Values/User/Preferences/PreferenceBehaviorTest.php50 public function albumsViewModeRejectsUnknownValue(): void
LOW…nit/Values/User/Preferences/PreferenceBehaviorTest.php57 public function albumsSortFieldRejectsUnknownValue(): void
LOW…nit/Values/User/Preferences/PreferenceBehaviorTest.php64 public function albumsSortOrderNormalizesToLowercase(): void
542 more matches not shown…
Fake / Example Data40 hits · 48 pts
SeverityFileLineSnippet
LOWresources/assets/js/composables/useKoelPlus.spec.ts10 customer_name: 'John Doe',
LOWresources/assets/js/composables/useKoelPlus.spec.ts31 expect(license.customerName).toBe('John Doe')
LOWresources/assets/js/stores/userStore.spec.ts53 name: 'Jane Doe',
LOWresources/assets/js/stores/userStore.spec.ts73 name: 'Jane Doe',
LOWresources/assets/js/components/ui/ProfileAvatar.spec.ts10 name: 'John Doe',
LOW…es/assets/js/components/auth/ResetPasswordForm.spec.ts19 expect(resetMock).toHaveBeenCalledWith('foo@bar.com', 'new-password', 'my-token')
LOW…es/assets/js/components/auth/ResetPasswordForm.spec.ts20 expect(loginMock).toHaveBeenCalledWith('foo@bar.com', 'new-password')
LOW…s/assets/js/components/auth/ForgotPasswordForm.spec.ts13 await h.type(screen.getByPlaceholderText('Your email address'), 'foo@bar.com')
LOW…s/assets/js/components/auth/ForgotPasswordForm.spec.ts16 expect(requestMock).toHaveBeenCalledWith('foo@bar.com')
LOW…ents/profile-preferences/EditableProfileAvatar.spec.ts12 profile: { name: 'John Doe', avatar: 'https://example.com/avatar.png' },
LOW…rces/assets/js/components/utils/AppInitializer.spec.ts41 currentUser: ref({ id: '1', email: 'test@test.com' }),
LOWresources/assets/js/components/user/AddUserForm.spec.ts24 name: 'John Doe',
LOWresources/assets/js/components/user/AddUserForm.spec.ts33 await h.type(screen.getByRole('textbox', { name: 'name' }), 'John Doe')
LOWresources/assets/js/components/user/AddUserForm.spec.ts41 name: 'John Doe',
LOWresources/assets/js/components/user/AddUserForm.spec.ts47 expect(toasterMock).toHaveBeenCalledWith('New user "John Doe" created.')
LOW…sources/assets/js/components/user/EditUserForm.spec.ts37 await h.type(screen.getByRole('textbox', { name: 'name' }), 'Jane Doe')
LOW…sources/assets/js/components/user/EditUserForm.spec.ts44 name: 'Jane Doe',
LOWresources/assets/js/components/ai/AiChatMessage.spec.ts14 const user = { name: 'John Doe', avatar: 'https://example.com/avatar.jpg' }
LOWresources/assets/js/__tests__/TestHarness.ts147 customer_name: 'John Doe',
LOWresources/assets/js/services/authService.spec.ts95 name: 'John Doe',
LOWresources/assets/js/services/authService.spec.ts100 name: 'Jane Doe',
LOWresources/assets/js/services/authService.spec.ts108 name: 'Jane Doe',
LOWresources/assets/js/services/authService.spec.ts115 expect(userStore.current.name).toBe('Jane Doe')
LOWtests/Unit/Services/Auth/AuthenticationServiceTest.php37 ->with(['email' => 'foo@bar.com'])
LOWtests/Unit/Services/Auth/AuthenticationServiceTest.php40 $this->assertTrue($this->service->trySendResetPasswordLink('foo@bar.com'));
LOW…sts/Integration/Services/UserInvitationServiceTest.php34 $emails = ['foo@bar.com', 'bar@baz.io'];
LOWtests/Feature/ProfileTest.php96 'email' => 'foo@bar.com',
LOWtests/Feature/ProfileTest.php104 'email' => 'foo@bar.com',
LOWtests/Feature/ForgotPasswordTest.php23 ->with('foo@bar.com')
LOWtests/Feature/ForgotPasswordTest.php26 $this->postJson('/api/forgot-password', ['email' => 'foo@bar.com'])->assertNoContent();
LOWtests/Feature/ForgotPasswordTest.php35 ->with('foo@bar.com')
LOWtests/Feature/ForgotPasswordTest.php38 $this->postJson('/api/forgot-password', ['email' => 'foo@bar.com'])->assertNotFound();
LOWtests/Feature/SongTest.php76 'lyrics' => 'Lorem ipsum dolor sic amet.',
LOWtests/Feature/SongTest.php95 'lyrics' => 'Lorem ipsum dolor sic amet.',
LOWtests/Feature/SongTest.php116 'lyrics' => 'Lorem ipsum dolor sic amet.',
LOWtests/Feature/SongTest.php184 'lyrics' => 'Lorem ipsum dolor sic amet.',
LOWtests/Feature/SongTest.php219 'lyrics' => 'Lorem ipsum dolor sic amet.',
LOWtests/Feature/SongTest.php240 'lyrics' => 'Lorem ipsum dolor sic amet.',
LOWtests/Feature/KoelPlus/UserTest.php19 'email' => 'foo@bar.com',
LOWtests/Feature/KoelPlus/UserTest.php36 'email' => 'foo@bar.com',
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippet
MEDIUM…es/assets/js/visualizers/asteroid/shaders/blob.frag.ts71 // http://the-witness.net/news/2012/02/seamless-cube-map-filtering/
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippet
LOW…es/assets/js/visualizers/asteroid/shaders/blob.vert.ts41#endif
LOWresources/assets/js/stores/userStore.ts61 // Didn't mean to make you cry
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWdocs/.vitepress/check-frontmatter.sh11 # Check if file starts with --- (has frontmatter) and contains a description field