AI Slop Code RIsk Monitor

rectorphp/rector

Instant Upgrades and Automated Refactoring of any PHP 5.3+ code

5.4 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for rectorphp/rector, a PHP project with 10,437 GitHub stars. SynthScan examined 124,248 lines of code across 1396 source files, recording 663 pattern matches distributed across 2 syntactic categories. The legacy adjusted pattern signal is 5.4 (Moderate 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.

5.4
Adjusted Signal
5.4
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
10.4K
Stars
PHP
Language
124.2K
Lines of Code
1.4K
Files
663
Pattern Hits
2026-10-12
Scan Date
0.00
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 23.7/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 0.0/100 · LOW

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

Agent Over-Engineering Ratio 23.6/100 · LOW

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

PR Review Velocity Impact 23.4/100 · LOW

Which changes need focused human review? 663 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 0LOW 663

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 663 distinct pattern matches across 2 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 Identifiers660 hits · 668 pts
SeverityFileLineSnippetContext
LOWbin/rector.php34 public function includeDependencyOrRepositoryVendorAutoloadIfExists(): voidCODE
LOWbin/rector.php47 public function autoloadProjectAutoloaderFile(): voidCODE
LOWbin/rector.php54 public function autoloadRectorInstalledAsGlobalDependency(): voidCODE
LOWbin/rector.php83 public function loadIfExistsAndNotLoadedYet(string $filePath): voidCODE
LOW…r/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php106 private function createDimFetchAssignWithFuncCall(Expr $assignVariable, Expr $eachedVariable, $dimValue, string $funCODE
LOWrules/Php72/NodeFactory/AnonymousFunctionFactory.php94 public function createAnonymousFunctionFromExpr(Expr $expr): ?ClosureCODE
LOWrules/Php72/NodeFactory/AnonymousFunctionFactory.php139 private function createUseVariablesFromParams(array $nodes, array $params): arrayCODE
LOW…or/Class_/ConstructorReadonlyAssignToDefaultRector.php102 private function isDefaultableReadonlyProperty(Property $property): boolCODE
LOWrules/Php81/Rector/Property/ReadOnlyPropertyRector.php270 private function isPropertyChangedInByRefForeach(Class_ $class, string $propertyName): boolCODE
LOWrules/Php81/Rector/Property/ReadOnlyPropertyRector.php285 private function isPromotedPropertyAssigned(Class_ $class, Param $param): boolCODE
LOW…Rector/New_/MyCLabsConstructorCallToEnumFromRector.php69 private function refactorConstructorCallToStaticFromCall(New_ $new): ?StaticCallCODE
LOW…hp81/Rector/Array_/ArrayToFirstClassCallableRector.php161 private function isReferenceToNonPublicMethodOutsideOwningScope(MethodCall $methodCall, string $methodName): boolCODE
LOW…r/MethodCall/SpatieEnumMethodCallToEnumConstRector.php85 private function refactorGetterToMethodCall(MethodCall $methodCall, string $property): ?PropertyFetchCODE
LOW…ctor/MethodCall/MyCLabsMethodCallToEnumConstRector.php118 private function refactorGetValueMethodCall(MethodCall $methodCall): ?PropertyFetchCODE
LOW…ctor/MethodCall/MyCLabsMethodCallToEnumConstRector.php217 private function getPropertyFetchOrVariable($expr)CODE
LOWrules/Php81/NodeFactory/EnumFactory.php116 private function createEnumCaseFromDocComment(PhpDocTagNode $phpDocTagNode, Class_ $class, array $mapping = [], boolCODE
LOWrules/Php81/NodeFactory/EnumFactory.php174 private function getIdentifierTypeFromMappings(array $mapping): stringCODE
LOW…p81/NodeManipulator/NullToStrictStringIntConverter.php147 private function isPropertyFetchOnClassWithMagicGet(Expr $expr): boolCODE
LOW…p81/NodeManipulator/NullToStrictStringIntConverter.php214 private function isPossibleArrayVariableName(Type $passedType, Type $reflectionParamType, Expr $expr): boolCODE
LOW…p81/NodeManipulator/NullToStrictStringIntConverter.php230 private function isStringCastedTernaryOfMixedTypes(Expr $expr, Scope $scope): boolCODE
LOW…74/Rector/FuncCall/MoneyFormatToNumberFormatRector.php81 private function warpInNumberFormatFuncCall(FuncCall $funcCall, Expr $expr): FuncCallCODE
LOW…es/Php74/NodeAnalyzer/ClosureArrowFunctionAnalyzer.php74 private function shouldSkipForUseVariableUsedByCompact(Closure $closure): boolCODE
LOW…es/Php74/NodeAnalyzer/ClosureArrowFunctionAnalyzer.php98 private function shouldSkipMoreSpecificTypeWithVarDoc(Return_ $return): boolCODE
LOW…es/Php74/NodeAnalyzer/ClosureArrowFunctionAnalyzer.php107 private function shouldSkipForUsedReferencedValue(Closure $closure): boolCODE
LOW…es/Php74/NodeAnalyzer/ClosureArrowFunctionAnalyzer.php140 private function resolveReferencedUseVariablesFromClosure(Closure $closure): arrayCODE
LOW…80/ValueObject/DoctrineTagAndAnnotationToAttribute.php22 public function getDoctrineAnnotationTagValueNode(): DoctrineAnnotationTagValueNodeCODE
LOWrules/Php80/ValueObject/NestedAnnotationToAttribute.php46 public function getAnnotationPropertiesToAttributeClasses(): arrayCODE
LOWrules/Php80/ValueObject/PropertyPromotionCandidate.php58 public function getConstructorAssignStmtPosition(): intCODE
LOWrules/Php80/ValueObject/AnnotationToAttribute.php61 public function getUseValueAsAttributeArgument(): boolCODE
LOW…ueObject/NestedDoctrineTagAndAnnotationToAttribute.php22 public function getDoctrineAnnotationTagValueNode(): DoctrineAnnotationTagValueNodeCODE
LOW…ueObject/NestedDoctrineTagAndAnnotationToAttribute.php26 public function getNestedAnnotationToAttribute(): \Rector\Php80\ValueObject\NestedAnnotationToAttributeCODE
LOW…p80/Rector/Ternary/TernaryToNullsafeCoalesceRector.php162 private function shouldSkipCoalesceFallback(Expr $callExpr): boolCODE
LOWrules/Php80/Rector/Ternary/GetDebugTypeRector.php108 private function shouldSkipClassConstFetch(ClassConstFetch $classConstFetch): boolCODE
LOW…ClassMethod/AddParamBasedOnParentClassMethodRector.php173 private function processAddNullDefaultParam(array $currentClassMethodParams, array $parentClassMethodParams): boolCODE
LOW…ClassMethod/AddParamBasedOnParentClassMethodRector.php196 private function processReplaceClassMethodParams(ClassMethod $classMethod, array $currentClassMethodParams, array $pCODE
LOW…/Rector/Property/NestedAnnotationToAttributeRector.php139 private function transformDoctrineAnnotationClassesToAttributeGroups(PhpDocInfo $phpDocInfo, array $uses): arrayCODE
LOW…/Rector/Property/NestedAnnotationToAttributeRector.php162 private function matchAnnotationToAttribute(DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode): ?\RectoCODE
LOWrules/Php80/Rector/Identical/StrEndsWithRector.php180 private function isUnaryMinusStrlenFuncCallArgValue(Expr $substrOffset, Expr $needle): boolCODE
LOWrules/Php80/Rector/Identical/StrEndsWithRector.php200 private function isHardCodedLNumberAndString(Expr $substrOffset, Expr $needle): boolCODE
LOW…es/Php80/Rector/Class_/AnnotationToAttributeRector.php193 private function resolveWithChangedAttributesClass(array $configuration): arrayCODE
LOW…es/Php80/Rector/Class_/AnnotationToAttributeRector.php248 private function processDoctrineAnnotationClasses(PhpDocInfo $phpDocInfo, array $uses): arrayCODE
LOW…es/Php80/Rector/Class_/AnnotationToAttributeRector.php348 private function matchAnnotationToAttribute(DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode): ?\RectoCODE
LOW…s_/ClassPropertyAssignToConstructorPromotionRector.php316 private function shouldSkipUntypedParentProperty(ClassReflection $classReflection, string $propertyName): boolCODE
LOW…s_/ClassPropertyAssignToConstructorPromotionRector.php360 private function shouldSkipPropertyOrParam(Property $property, Param $param): boolCODE
LOW…s_/ClassPropertyAssignToConstructorPromotionRector.php377 private function shouldSkipNarrowingVarDoc(Property $property, Param $param, PhpDocInfo $constructorPhpDocInfo, striCODE
LOW…s_/ClassPropertyAssignToConstructorPromotionRector.php403 private function shouldRemoveNullFromForPromotedParamType(Property $property, Param $param): boolCODE
LOW…s_/ClassPropertyAssignToConstructorPromotionRector.php420 private function shouldUsePropertyTypeForPromotedParam(Property $property, Param $param): boolCODE
LOW…s_/ClassPropertyAssignToConstructorPromotionRector.php443 private function shouldSkipPropertyAssignedNull(Class_ $class, string $propertyName): boolCODE
LOW…p80/NodeAnalyzer/PromotedPropertyCandidateResolver.php97 private function matchPropertyPromotionCandidate(Property $property, ClassMethod $constructClassMethod, int $propertCODE
LOW…p80/NodeAnalyzer/PromotedPropertyCandidateResolver.php161 private function matchClassMethodParamByAssignedVariable(ClassMethod $classMethod, Variable $variable): ?ParamCODE
LOW…p80/NodeAnalyzer/PromotedPropertyCandidateResolver.php188 private function isParamReadAfterPropertyMutation(ClassMethod $constructClassMethod, int $assignStmtPosition, stringCODE
LOWrules/Php80/NodeAnalyzer/MatchSwitchAnalyzer.php89 public function haveCondAndExprsMatchPotential(array $condAndExprs): boolCODE
LOWrules/Php80/NodeAnalyzer/MatchSwitchAnalyzer.php113 public function hasCondsAndExprDefaultValue(array $condAndExprs): boolCODE
LOWrules/Php80/NodeAnalyzer/MatchSwitchAnalyzer.php140 private function resolveUniqueKindsWithoutThrows(array $condAndExprs): arrayCODE
LOWrules/Php80/NodeAnalyzer/PhpAttributeAnalyzer.php76 private function hasArgWithRemoveArrayValue(array $args): boolCODE
LOW…les/Php80/DocBlock/PropertyPromotionDocBlockMerger.php55 public function mergePropertyAndParamDocBlocks(Property $property, Param $param, ?ParamTagValueNode $paramTagValueNoCODE
LOW…les/Php80/DocBlock/PropertyPromotionDocBlockMerger.php72 public function decorateParamWithPropertyPhpDocInfo(ClassMethod $classMethod, Property $property, Param $param, striCODE
LOW…rStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php95 private function isHardcodedStringWithLNumberLength(StrStartsWith $strStartsWith): boolCODE
LOW…StartsWithMatchAndRefactor/StrncmpMatchAndRefactor.php98 private function isHardcodedStringWithLNumberLength(StrStartsWith $strStartsWith): boolCODE
LOWrules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php184 private function hasInternalPointerChangeNext(Node $stmtsAware, int $nextKey, int $totalKeys, FuncCall $funcCall): bCODE
600 more matches not shown…
Verbosity Indicators3 hits · 4 pts
SeverityFileLineSnippetContext
LOW…nalyzer/ReturnTypeAnalyzer/StrictReturnNewAnalyzer.php58 // in case of more returns, we need to check if they all return the same variableCOMMENT
LOWrules/Arguments/ArgumentDefaultValueReplacer.php123 // before any named argument, we need to check if it is in the list of named argumentsCOMMENT
LOW…ents/Rector/MethodCall/RemoveMethodCallParamRector.php92 // before any named argument, we need to check if it is in the list of named argumentsCOMMENT