AI Slop Code Risk Monitor

yiisoft/yii2

SlopCodeMonitor badge for yiisoft/yii2 Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

Yii 2: The Fast, Secure and Professional PHP Framework

3.5 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for yiisoft/yii2, a PHP project with 14,277 GitHub stars. SynthScan examined 435,542 lines of code across 1963 source files, recording 1487 pattern matches distributed across 4 syntactic categories. The legacy adjusted pattern signal is 3.5 (Low pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

3.5
Adjusted Signal
3.5
Raw Pattern Score
100%
Time Factor
2026-10-30
Last Push
14.3K
Stars
PHP
Language
435.5K
Lines of Code
2.0K
Files
1.5K
Pattern Hits
2026-10-31
Scan Date
0.00
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 14.9/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 1395 finding(s).

Hallucinated Dependency & Supply Chain Risk 1.3/100 · LOW

Are imports declared and package/API names verified? 92 finding(s).

Agent Over-Engineering Ratio 14.7/100 · LOW

Are wrappers, guards, and repeated structures necessary? 1381 finding(s).

PR Review Velocity Impact 15.7/100 · LOW

Which changes need focused human review? 1487 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 0MEDIUM 1LOW 1486

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1487 distinct pattern matches across 4 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers1381 hits · 1386 pts
SeverityFileLineSnippetContext
LOWframework/UPGRADE.md1197 `public static function findIdentityByAccessToken($token, $type = null)`. The new `$type` parameterCODE
LOWframework/filters/PageCache.php283 private function insertResponseCookieCollectionIntoData(Response $response, array &$data)CODE
LOWframework/filters/PageCache.php307 private function insertResponseHeaderCollectionIntoData(Response $response, array &$data)CODE
LOWframework/rbac/DbManager.php581 protected function getDirectPermissionsByUser($userId)CODE
LOWframework/rbac/DbManager.php605 protected function getInheritedPermissionsByUser($userId)CODE
LOWframework/rbac/PhpManager.php493 protected function getDirectPermissionsByUser($userId)CODE
LOWframework/rbac/PhpManager.php513 protected function getInheritedPermissionsByUser($userId)CODE
LOWframework/di/Container.php660 public function resolveCallableDependencies(callable $callback, $params = [])CODE
LOWframework/web/Controller.php210 private function filterSingleTypeActionParam($param, $type)CODE
LOWframework/web/Controller.php255 private function filterUnionTypeActionParam($param, $type)CODE
LOWframework/web/Response.php825 protected function getDispositionHeaderValue($disposition, $attachmentName)CODE
LOWframework/web/Session.php523 public function getUseTransparentSessionID()CODE
LOWframework/web/Session.php534 public function setUseTransparentSessionID($value)CODE
LOWframework/web/User.php600 protected function getIdentityAndDurationFromCookie()CODE
LOWframework/web/IdentityInterface.php25 * public static function findIdentityByAccessToken($token, $type = null)COMMENT
LOWframework/web/IdentityInterface.php77 public static function findIdentityByAccessToken($token, $type = null);CODE
LOWframework/web/UrlRule.php577 protected function substitutePlaceholderNames(array $matches)CODE
LOWframework/web/Request.php1513 public function getAcceptableContentTypes()CODE
LOWframework/web/Request.php1534 public function setAcceptableContentTypes($value)CODE
LOWframework/web/Request.php1927 private function validateCsrfTokenInternal($clientSuppliedToken, $trueToken)CODE
LOWframework/web/Request.php1947 protected function getSecureForwardedHeaderTrustedPart($token)CODE
LOWframework/web/Request.php1969 protected function getSecureForwardedHeaderTrustedParts()CODE
LOWframework/web/Request.php2004 protected function getSecureForwardedHeaderParts()CODE
LOWframework/web/ErrorHandler.php442 public function createServerInformationLink()CODE
LOWframework/web/ErrorHandler.php470 public function createFrameworkVersionLink()CODE
LOWframework/behaviors/CacheableWidgetBehavior.php189 private function getFragmentCacheConfiguration()CODE
LOWframework/behaviors/AttributeTypecastBehavior.php197 public static function clearAutoDetectedAttributeTypes()CODE
LOWframework/db/Connection.php843 private function rollbackTransactionOnLevel($transaction, $level)CODE
LOWframework/db/Connection.php905 private function restoreQueryBuilderConfiguration()CODE
LOWframework/db/Command.php1243 protected function requireTableSchemaRefresh($name)CODE
LOWframework/db/Schema.php332 public function createColumnSchemaBuilder($type, $length = null)CODE
LOWframework/db/Schema.php419 public function setTransactionIsolationLevel($level)CODE
LOWframework/db/Schema.php833 private function loadTableMetadataFromCache($cache, $name)CODE
LOWframework/db/Query.php759 protected function getUnaliasedColumnsFromSelect()CODE
LOWframework/db/QueryBuilder.php168 protected function defaultExpressionBuilders()CODE
LOWframework/db/QueryBuilder.php411 protected function prepareInsertSelectSubQuery($columns, $schema, $params = [])CODE
LOWframework/db/QueryBuilder.php576 private function getTableUniqueColumnNames($name, $columns, &$constraints = [])CODE
LOWframework/db/oci/Schema.php277 public function createColumnSchemaBuilder($type, $length = null)CODE
LOWframework/db/oci/QueryBuilder.php59 protected function defaultExpressionBuilders()CODE
LOWframework/db/sqlite/Schema.php222 public function createColumnSchemaBuilder($type, $length = null)CODE
LOWframework/db/sqlite/Schema.php373 public function setTransactionIsolationLevel($level)CODE
LOWframework/db/sqlite/QueryBuilder.php59 protected function defaultExpressionBuilders()CODE
LOWframework/db/sqlite/conditions/InConditionBuilder.php38 protected function buildCompositeInCondition($operator, $columns, $values, &$params)CODE
LOWframework/db/cubrid/Schema.php358 public function setTransactionIsolationLevel($level)CODE
LOWframework/db/cubrid/Schema.php381 public function createColumnSchemaBuilder($type, $length = null)CODE
LOWframework/db/cubrid/QueryBuilder.php55 protected function defaultExpressionBuilders()CODE
LOWframework/db/mysql/Schema.php524 public function createColumnSchemaBuilder($type, $length = null)CODE
LOWframework/db/mysql/QueryBuilder.php65 protected function defaultExpressionBuilders()CODE
LOWframework/db/mysql/QueryBuilder.php389 private function supportsFractionalSeconds()CODE
LOWframework/db/conditions/InConditionBuilder.php197 protected function buildCompositeInCondition($operator, $columns, $values, &$params)CODE
LOWframework/db/conditions/InConditionBuilder.php252 protected function getRawValuesFromTraversableObject(\Traversable $traversableObject)CODE
LOWframework/db/pgsql/Schema.php403 protected function getUniqueIndexInformation($table)CODE
LOWframework/db/pgsql/QueryBuilder.php97 protected function defaultExpressionBuilders()CODE
LOWframework/db/mssql/Schema.php827 public function createColumnSchemaBuilder($type, $length = null)CODE
LOWframework/db/mssql/QueryBuilder.php57 protected function defaultExpressionBuilders()CODE
LOWframework/db/mssql/conditions/InConditionBuilder.php38 protected function buildCompositeInCondition($operator, $columns, $values, &$params)CODE
LOWframework/log/Dispatcher.php221 protected function generateTargetFailErrorMessage($target, $throwable, $method)CODE
LOWframework/validators/ExistValidator.php123 private function checkTargetRelationExistence($model, $attribute)CODE
LOWframework/validators/ExistValidator.php155 private function checkTargetAttributeExistence($model, $attribute)CODE
LOWframework/i18n/Formatter.php1851 private function setFormatterTextAttribute($formatter, $attribute, $value, $source, $alternative)CODE
1321 more matches not shown…
Fake / Example Data92 hits · 111 pts
SeverityFileLineSnippetContext
LOWframework/db/sqlite/Command.php108 $phName = ltrim($match['placeholder'], ':');CODE
LOWframework/log/Dispatcher.php39 * 'to' => 'admin@example.com',COMMENT
LOW⚡framework/helpers/BaseConsole.php745 * The first line will **not** be indented, so `Console::wrapText("Lorem ipsum dolor sit amet.", 4)` will result in COMMENT
LOW⚡framework/helpers/BaseConsole.php745 * The first line will **not** be indented, so `Console::wrapText("Lorem ipsum dolor sit amet.", 4)` will result in COMMENT
LOW⚡framework/helpers/BaseConsole.php749 * Lorem ipsumCOMMENT
LOWframework/helpers/BaseHtml.php1460 if (isset($options['placeholder']) && $options['placeholder'] === true) {CODE
LOWframework/helpers/BaseHtml.php1462 $options['placeholder'] = $model->getAttributeLabel($attribute);CODE
LOWtests/framework/mail/BaseMailerTest.php242<p>Test Lorem ipsum...</p>CODE
LOWtests/framework/mail/BaseMailerTest.php252Test Lorem ipsum...CODE
LOWtests/framework/web/UrlManagerCreateUrlTest.php753 $this->assertEquals('/user/show?name=John+Doe', $manager->createUrl(['user/show', 'name' => 'John Doe']));CODE
LOWtests/framework/web/UrlManagerCreateUrlTest.php765 $this->assertEquals('/user/profile?name=John+Doe', $manager->createUrl(['user/profile', 'name' => 'John Doe']));CODE
LOWtests/framework/web/UrlManagerCreateUrlTest.php795 $this->assertEquals('/user/show?name=John+Doe', $manager->createUrl(['user/show', 'name' => 'John Doe']));CODE
LOW⚡tests/framework/behaviors/AttributeBehaviorTest.php73 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributeBehaviorTest.php75 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributeBehaviorTest.php79 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributeBehaviorTest.php81 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributeBehaviorTest.php85 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributeBehaviorTest.php87 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributeBehaviorTest.php93 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributesBehaviorTest.php73 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributesBehaviorTest.php75 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributesBehaviorTest.php79 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributesBehaviorTest.php81 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributesBehaviorTest.php85 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributesBehaviorTest.php87 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributesBehaviorTest.php93 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributesBehaviorTest.php131 'John Doe', // nameCODE
LOW⚡tests/framework/behaviors/AttributesBehaviorTest.php135 'John Doe',CODE
LOW⚡tests/framework/behaviors/AttributesBehaviorTest.php138 'John Doe', // nameCODE
LOWtests/framework/db/QueryTest.php486 $query->andFilterCompare('name', 'John Doe');CODE
LOWtests/framework/db/QueryTest.php487 $condition = ['=', 'name', 'John Doe'];CODE
LOWtests/framework/db/ActiveRecordTest.php1149 $this->assertEquals('John Doe', $dossier->employee->fullName);CODE
LOW⚡tests/framework/helpers/HtmlTest.php2237 $html = Html::activeTextInput($model, 'name', ['placeholder' => true]);CODE
LOW⚡tests/framework/helpers/HtmlTest.php2246 $html = Html::activeTextInput($model, 'name', ['placeholder' => 'Custom placeholder']);CODE
LOW⚡tests/framework/helpers/HtmlTest.php2255 $html = Html::activeTextInput($model, '[0]name', ['placeholder' => true]);CODE
LOW⚡tests/framework/helpers/HtmlTest.php2264 $html = MyHtml::activeTextInput($model, 'name', ['placeholder' => true]);CODE
LOWtests/framework/helpers/StringHelperTest.php140 $this->assertEquals('lorem ipsum', StringHelper::truncateWords('lorem ipsum', 3, '...', true));CODE
LOWtests/framework/helpers/StringHelperTest.php141 $this->assertEquals(' lorem ipsum', StringHelper::truncateWords(' lorem ipsum', 3, '...', true));CODE
LOW⚡tests/framework/base/ArrayableTraitTest.php82 $this->assertSame('John Doe', $result['fullName']);CODE
LOW⚡tests/framework/base/ArrayableTraitTest.php316 $model->email = 'test@test.com';CODE
LOW⚡tests/framework/base/ArrayableTraitTest.php320 $this->assertSame('test@test.com', $result['email']);CODE
LOW⚡tests/framework/base/ArrayableTraitTest.php327 $item->email = 'test@test.com';CODE
LOW⚡tests/framework/widgets/ActiveFieldTest.php680 'options' => ['placeholder' => 'pholder_direct'],CODE
LOW⚡tests/framework/widgets/ActiveFieldTest.php686 'options' => ['placeholder' => 'pholder_direct'],CODE
LOW⚡tests/framework/widgets/ActiveFieldTest.php692 $this->activeField->inputOptions = ['placeholder' => 'pholder_input'];CODE
LOW⚡tests/framework/widgets/ActiveFieldTest.php699 $this->activeField->inputOptions = ['placeholder' => 'pholder_both_input'];CODE
LOW⚡tests/framework/widgets/ActiveFieldTest.php702 'options' => ['placeholder' => 'pholder_both_direct']CODE
LOWdocs/documentation_style_guide.md82 "Jane Doe",CODE
LOWdocs/documentation_style_guide.md83 "John Doe"CODE
LOWdocs/guide/rest-resources.md193 "email": "user@example.com",CODE
LOWdocs/guide/runtime-logging.md88 'to' => ['admin@example.com', 'developer@example.com'],CODE
LOWdocs/guide/db-query-builder.md425$query->andFilterCompare('name', 'John Doe');CODE
LOWdocs/guide/rest-quick-start.md167 -d '{"username": "example", "email": "user@example.com"}'CODE
LOWdocs/guide/rest-quick-start.md175{"id":1,"username":"example","email":"user@example.com","created_at":1414674789,"updated_at":1414674789}CODE
LOWdocs/guide/helper-html.md389<?= Html::mailto('Contact us', 'admin@example.com') ?>CODE
LOWdocs/guide/helper-array.md380 'admin' => 'admin@example.com',CODE
LOWdocs/guide/helper-array.md417 'admin' => 'admin@example.com',CODE
LOWdocs/guide-ja/rest-resources.md193 "email": "user@example.com",CODE
LOWdocs/guide-ja/runtime-logging.md88 'to' => ['admin@example.com', 'developer@example.com'],CODE
LOWdocs/guide-ja/db-query-builder.md425$query->andFilterCompare('name', 'John Doe');CODE
32 more matches not shown…
Over-Commented Block13 hits · 13 pts
SeverityFileLineSnippetContext
LOWframework/messages/config.php21 ],COMMENT
LOWframework/views/messageConfig.php21 // messages will be separated from the old (translated) ones.COMMENT
LOWtests/framework/db/QueryBuilderTest.php241 ],COMMENT
LOWtests/framework/db/QueryBuilderTest.php861 'sqlsrv' => 'nvarchar(max)',COMMENT
LOWtests/data/web/assetSources/js/jquery.js1// Let's imagine this is a jQuery plugin :)COMMENT
LOWdocs/guide/helper-array.md261 ['id' => '124', 'name' => 'bbb', 'class' => 'x'],COMMENT
LOWdocs/guide/helper-array.md581// 'a.b' => 'string',COMMENT
LOWdocs/guide-ja/helper-array.md261 ['id' => '124', 'name' => 'bbb', 'class' => 'x'],COMMENT
LOWdocs/guide-ru/helper-array.md201// ]COMMENT
LOWdocs/guide-ru/helper-array.md441];COMMENT
LOWdocs/guide-fr/helper-array.md201// le résultat est :COMMENT
LOWdocs/guide-es/helper-array.md221COMMENT
LOWdocs/guide-zh-CN/helper-array.md261 ['id' => '124', 'name' => 'bbb', 'class' => 'x'],COMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMframework/data/ActiveDataFilter.php57 * used in [[\yii\db\QueryInterface::where()]]. However, you may want to adjust it in some special cases.COMMENT