Repository Analysis

codeigniter4/CodeIgniter4

Open Source PHP Framework (originally from EllisLab)

9.7 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of codeigniter4/CodeIgniter4, a PHP project with 5,940 GitHub stars. SynthScan v2.0 examined 277,977 lines of code across 3096 source files, recording 2679 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 9.7 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

9.7
Adjusted Score
9.7
Raw Score
100%
Time Factor
2026-07-13
Last Push
5.9K
Stars
PHP
Language
278.0K
Lines of Code
3.1K
Files
2.7K
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 1HIGH 0MEDIUM 1LOW 2677

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 2679 distinct pattern matches across 6 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers2589 hits · 2573 pts
SeverityFileLineSnippetContext
LOWtests/_support/API/ParentTransformer.php46 protected function includeChildrenCollection(): arrayCODE
LOWtests/system/DebugTraceableTraitTest.php27 public function testFactoryInstanceReturnsWhereItIsRaised(): voidCODE
LOWtests/system/CommonSingleServiceTest.php33 public function testSingleServiceWithNoParamsSupplied(string $service): voidCODE
LOWtests/system/CommonSingleServiceTest.php47 public function testSingleServiceWithAtLeastOneParamSupplied(string $service): voidCODE
LOWtests/system/CommonSingleServiceTest.php121 public function testSingleServiceWithAllParamsSupplied(): voidCODE
LOWtests/system/CommonSingleServiceTest.php135 public function testSingleServiceWithGibberishGiven(): voidCODE
LOWtests/system/ControllerTest.php116 public function testValidateWithStringRulesNotFound(): voidCODE
LOWtests/system/ControllerTest.php128 public function testValidateWithStringRulesFoundReadMessagesFromValidationConfig(): voidCODE
LOWtests/system/ControllerTest.php158 public function testValidateWithStringRulesFoundUseMessagesParameter(): voidCODE
LOWtests/system/ControllerTest.php206 public function testValidateDataWithCustomErrorMessage(): voidCODE
LOWtests/system/ControllerTest.php239 public function testValidateDataWithCustomErrorMessageLabeledStyle(): voidCODE
LOWtests/system/CommonFunctionsSendTest.php43 public function testRedirectResponseCookiesSent(): voidCODE
LOWtests/system/SuperglobalsTest.php46 public function testServerGetReturnsNullForNonExistent(): voidCODE
LOWtests/system/SuperglobalsTest.php114 public function testGetReturnsNullForNonExistent(): voidCODE
LOWtests/system/SuperglobalsTest.php164 public function testPostReturnsNullForNonExistent(): voidCODE
LOWtests/system/SuperglobalsTest.php214 public function testCookieReturnsNullForNonExistent(): voidCODE
LOWtests/system/SuperglobalsTest.php264 public function testRequestReturnsNullForNonExistent(): voidCODE
LOWtests/system/SuperglobalsTest.php324 public function testFilesSetArrayWithMultipleFiles(): voidCODE
LOWtests/system/SuperglobalsTest.php369 public function testGetGlobalArrayForFiles(): voidCODE
LOWtests/system/SuperglobalsTest.php386 public function testGetGlobalArrayThrowsExceptionForInvalidName(): voidCODE
LOWtests/system/SuperglobalsTest.php404 public function testSetGlobalArrayForFiles(): voidCODE
LOWtests/system/SuperglobalsTest.php422 public function testSetGlobalArrayThrowsExceptionForInvalidName(): voidCODE
LOWtests/system/SuperglobalsTest.php431 public function testConstructorWithCustomArrays(): voidCODE
LOWtests/system/SuperglobalsTest.php458 public function testConstructorSynchronizesWithPhpSuperglobals(): voidCODE
LOWtests/system/SuperglobalsTest.php487 public function testFluentApiMethodChaining(): voidCODE
LOWtests/system/SuperglobalsTest.php519 public function testFluentApiWithArraySetters(): voidCODE
LOWtests/system/SuperglobalsTest.php536 public function testFluentApiMixedOperations(): voidCODE
LOWtests/system/CodeIgniterTest.php89 public function testOutputBufferingControl(): voidCODE
LOWtests/system/CodeIgniterTest.php99 public function testRunEmptyDefaultRouteReturnResponse(): voidCODE
LOWtests/system/CodeIgniterTest.php221 public function testControllersCanReturnString(): voidCODE
LOWtests/system/CodeIgniterTest.php245 public function testControllersCanReturnResponseObject(): voidCODE
LOWtests/system/CodeIgniterTest.php274 public function testControllersCanReturnDownloadResponseObject(): voidCODE
LOWtests/system/CodeIgniterTest.php299 public function testRunExecuteFilterByClassName(): voidCODE
LOWtests/system/CodeIgniterTest.php327 public function testRegisterSameFilterTwiceWithDifferentArgument(): voidCODE
LOWtests/system/CodeIgniterTest.php365 public function testDisableControllerFilters(): voidCODE
LOWtests/system/CodeIgniterTest.php421 public function testTransfersCorrectHTTPVersion(): voidCODE
LOWtests/system/CodeIgniterTest.php453 public function testIgnoringErrorSuppressedByAt(): voidCODE
LOWtests/system/CodeIgniterTest.php494 public function testRunRedirectionWithNamed(): voidCODE
LOWtests/system/CodeIgniterTest.php518 public function testRunRedirectionWithURI(): voidCODE
LOWtests/system/CodeIgniterTest.php545 public function testRunRedirectionWithGET(): voidCODE
LOWtests/system/CodeIgniterTest.php663 public function testNotStoresPreviousURLByCheckingContentType(): voidCODE
LOWtests/system/CodeIgniterTest.php725 public function testSpoofRequestMethodCanUsePUT(): voidCODE
LOWtests/system/CodeIgniterTest.php750 public function testSpoofRequestMethodCannotUseGET(): voidCODE
LOWtests/system/CodeIgniterTest.php778 public function testPageCacheSendSecureHeaders(): voidCODE
LOWtests/system/CodeIgniterTest.php842 public function testPageCacheWithCacheQueryString(CODE
LOWtests/system/CodeIgniterTest.php908 public static function providePageCacheWithCacheQueryString(): iterableCODE
LOWtests/system/CodeIgniterTest.php945 public function testRunControllerNotFoundBeforeFilter(): voidCODE
LOWtests/system/CodeIgniterTest.php968 public function testStartControllerPermitsInvoke(): voidCODE
LOWtests/system/CodeIgniterTest.php990 public function testRouteAttributeCacheIntegration(): voidCODE
LOWtests/system/CodeIgniterTest.php1050 public function testRouteAttributeFilterIntegration(): voidCODE
LOWtests/system/CodeIgniterTest.php1078 public function testRouteAttributeFilterWithParamsIntegration(): voidCODE
LOWtests/system/CodeIgniterTest.php1106 public function testRouteAttributeRestrictIntegration(): voidCODE
LOWtests/system/CodeIgniterTest.php1128 public function testRouteAttributeRestrictThrowsException(): voidCODE
LOWtests/system/CodeIgniterTest.php1149 public function testRouteAttributeMultipleAttributesIntegration(): voidCODE
LOWtests/system/CodeIgniterTest.php1177 public function testRouteAttributeNoAttributesIntegration(): voidCODE
LOWtests/system/CodeIgniterTest.php1199 public function testRouteAttributeCustomCacheKeyIntegration(): voidCODE
LOWtests/system/CodeIgniterTest.php1233 public function testRouteAttributesDisabledInConfig(): voidCODE
LOWtests/system/HomeTest.php29 public function testPageLoadsSuccessfully(): voidCODE
LOWtests/system/CommonHelperTest.php92 public function testHelperWithFatalLocatorThrowsException(): voidCODE
LOWtests/system/CommonHelperTest.php127 public function testHelperLoadsAppHelperFirst(): voidCODE
2529 more matches not shown…
Fake / Example Data66 hits · 76 pts
SeverityFileLineSnippetContext
LOWtests/system/Models/DataConverterModelTest.php293 $user['email'][] = 'private@example.org';CODE
LOWtests/system/Models/DataConverterModelTest.php300 'private@example.org',CODE
LOWtests/system/Models/DataConverterModelTest.php309 $user->email[] = 'private@example.org';CODE
LOWtests/system/Models/DataConverterModelTest.php316 'private@example.org',CODE
LOWtests/system/Models/DataConverterModelTest.php326 $user->addEmail('private@example.org');CODE
LOWtests/system/Models/DataConverterModelTest.php333 'private@example.org',CODE
LOWtests/system/Models/DataConverterModelTest.php343 $email[] = 'private@example.org';CODE
LOWtests/system/Models/DataConverterModelTest.php351 'private@example.org',CODE
LOWtests/system/Models/DataConverterModelTest.php360 $user['email'][] = 'private@example.org';CODE
LOWtests/system/Models/DataConverterModelTest.php367 'private@example.org',CODE
LOWtests/system/Models/DataConverterModelTest.php376 $user->email[] = 'private@example.org';CODE
LOWtests/system/Models/DataConverterModelTest.php383 'private@example.org',CODE
LOWtests/system/Models/DataConverterModelTest.php393 $user->addEmail('private@example.org');CODE
LOWtests/system/Models/DataConverterModelTest.php400 'private@example.org',CODE
LOWtests/system/Models/DataConverterModelTest.php410 $email[] = 'private@example.org';CODE
LOWtests/system/Models/DataConverterModelTest.php418 'private@example.org',CODE
LOWtests/system/Models/UpdateModelTest.php398 $entity->email = 'jones@example.org';CODE
LOWtests/system/Models/UpdateModelTest.php419 $object->email = 'jones@example.org';CODE
LOWtests/system/Models/UpdateModelTest.php440 $object->email = 'jones@example.org';CODE
LOWtests/system/Models/UpdateModelTest.php448 'email' => 'john@example.org',CODE
LOWtests/system/HTTP/CURLRequestTest.php1404 $jsonBody = '{"name":"John Doe","age":30}';CODE
LOWtests/system/View/TableTest.php392 'email' => ['data' => 'foo@bar.com'],CODE
LOWtests/system/View/ParserTest.php92 'body' => 'Lorem ipsum dolor sit amet.',CODE
LOWtests/system/View/ParserTest.php92 'body' => 'Lorem ipsum dolor sit amet.',CODE
LOWtests/system/View/ParserTest.php107 'body' => 'Lorem ipsum dolor sit amet.',CODE
LOWtests/system/View/ParserTest.php107 'body' => 'Lorem ipsum dolor sit amet.',CODE
LOWtests/system/View/ParserTest.php113 $result = "Page Title\nLorem ipsum dolor sit amet.";CODE
LOWtests/system/View/ParserTest.php113 $result = "Page Title\nLorem ipsum dolor sit amet.";CODE
LOWtests/system/View/ParserTest.php77 'body' => 'Lorem ipsum dolor sit amet.',CODE
LOWtests/system/View/ParserTest.php77 'body' => 'Lorem ipsum dolor sit amet.',CODE
LOWtests/system/View/ParserTest.php740 'body' => 'Lorem ipsum dolor sit amet.',CODE
LOWtests/system/View/ParserTest.php740 'body' => 'Lorem ipsum dolor sit amet.',CODE
LOWtests/system/View/ParserTest.php755 'body' => 'Lorem ipsum dolor sit amet.',CODE
LOWtests/system/View/ParserTest.php755 'body' => 'Lorem ipsum dolor sit amet.',CODE
LOWtests/system/View/ParserTest.php934 'body' => 'Lorem ipsum',CODE
LOWtests/system/View/ParserTest.php951 <p>Lorem ipsum</p>CODE
LOWtests/system/View/DBResultDummy.php36 'name' => 'John Doe',CODE
LOWtests/system/View/DBResultDummy.php41 'email' => 'foo@bar.com',CODE
LOWtests/system/Format/XMLFormatterTest.php161 'email' => 'foo@bar.com',CODE
LOWtests/system/Commands/Housekeeping/ClearLogsTest.php69 file_put_contents($path, 'Lorem ipsum');CODE
LOWtests/system/Commands/Housekeeping/ClearLogsTest.php155 file_put_contents($path, 'Lorem ipsum');CODE
LOWtests/system/Validation/ValidationTest.php2192 'name' => 'John Doe',CODE
LOWtests/system/Validation/ValidationTest.php2213 'name' => 'John Doe',CODE
LOWtests/system/Router/RouteCollectionTest.php742 $routes->resource('photos', ['placeholder' => ':num']);CODE
LOWsystem/Router/RouteCollection.php824 * 'placeholder' - The regex used by the Router. Defaults to '(:any)'COMMENT
LOWsystem/Router/RouteCollection.php865 $id = $options['placeholder'] ?? $this->placeholders[$this->defaultPlaceholder] ?? '(:segment)';CODE
LOWsystem/Router/RouteCollection.php923 * 'placeholder' - The regex used by the Router. Defaults to '(:any)'COMMENT
LOWsystem/Router/RouteCollection.php959 $id = $options['placeholder'] ?? $this->placeholders[$this->defaultPlaceholder] ?? '(:segment)';CODE
LOWuser_guide_src/source/database/queries/019.php11$name = 'John Doe';CODE
LOWuser_guide_src/source/outgoing/api_transformers/015.php7$user->name = 'John Doe';CODE
LOWuser_guide_src/source/outgoing/api_transformers/014.php7 'name' => 'John Doe',CODE
LOWuser_guide_src/source/outgoing/api_transformers/013.php8 'name' => 'John Doe',CODE
LOWuser_guide_src/source/outgoing/api_transformers/007.php22// Response: {"id": 1, "name": "John Doe"}COMMENT
LOWuser_guide_src/source/outgoing/api_transformers/018.php13$userData = ['id' => 1, 'name' => 'John Doe'];CODE
LOWuser_guide_src/source/cli/cli_library/017.php10 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',CODE
LOWuser_guide_src/source/cli/cli_library/017.php11 "Lorem Ipsum has been the industry's standard dummy text ever since the",CODE
LOWuser_guide_src/source/testing/fabricator/009.php5 'email' => 'king.alford@example.org',CODE
LOWuser_guide_src/source/testing/fabricator/018.php5 'email' => 'belingadon142@example.org',CODE
LOW…uide_src/source/incoming/controller_attributes/007.php18 'name' => 'John Doe',CODE
LOWuser_guide_src/source/incoming/restful/004.php3$routes->resource('photos', ['placeholder' => '(:num)']);CODE
6 more matches not shown…
Over-Commented Block20 hits · 20 pts
SeverityFileLineSnippetContext
LOWapp/Config/Logger.php141 // /* The log levels this handler can handle. */COMMENT
LOWapp/Config/UserAgents.php121 */COMMENT
LOWapp/Config/Database.php61 // 'DBDriver' => 'SQLite3',COMMENT
LOWapp/Config/Database.php81 // public array $default = [COMMENT
LOWapp/Config/Database.php101 // ];COMMENT
LOWapp/Config/Database.php121 // 'encrypt' => false,COMMENT
LOWapp/Config/Database.php141 // */COMMENT
LOWapp/Config/Validation.php41 // --------------------------------------------------------------------COMMENT
LOWtests/system/CodeIgniterTest.php921 ];COMMENT
LOWtests/system/Database/Live/TransactionTest.php81 ];COMMENT
LOWsystem/Debug/Toolbar/Views/toolbar.css361COMMENT
LOWsystem/Debug/Toolbar/Views/toolbar.css501 background-color: #252525;COMMENT
LOWsystem/Debug/Toolbar/Views/toolbar.css621#toolbarContainer.dark #debug-bar button,COMMENT
LOWsystem/Debug/Toolbar/Views/toolbar.css721 -webkit-box-shadow: 0 0 4px #DFDFDF;COMMENT
LOWuser_guide_src/source/conf.py1# Configuration file for the Sphinx documentation builder.COMMENT
LOWuser_guide_src/source/database/query_builder/108.php21// SQLite3 produces: INSERT INTO.. ON CONFLICT.. DO UPDATE..COMMENT
LOWuser_guide_src/source/outgoing/api_transformers/007.php21// Request: GET /users/1?fields=id,nameCOMMENT
LOWuser_guide_src/source/incoming/routing/074.php21// [priority] => 1COMMENT
LOW.github/scripts/random-tests-config.txt1# CodeIgniter4 Components Verified for Random Test ExecutionCOMMENT
LOW.github/scripts/run-random-tests.sh1#!/usr/bin/env bashCOMMENT
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICAL.github/workflows/label-pr.yml26 const prFiles = await github.paginate(github.rest.pulls.listFiles.endpoint.merge({CODE
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/deploy-userguide-latest.yml60 # Create an artifact of the html outputCOMMENT
Slop Phrases2 hits · 2 pts
SeverityFileLineSnippetContext
LOWapp/Config/Session.php70 * WARNING: If you're using the database driver, don't forget to updateCOMMENT
LOWpublic/index.php12$minPhpVersion = '8.2'; // If you update this, don't forget to update `spark`.CODE