PHP Static analysis for Squid

Label Recipes Issues Files Severity Frequence
Randomly Sorted Arrays All, Analyze, Level 4, Suggestions 19 4 Minor 41 %
Abstract Or Implements All, Analyze, LintButWontExec 7 7 Major 4 %
Accessing Private Analyze, All, Simple 22 12 Major 13 %
Ambiguous Static All, Analyze 69 56 Minor 64 %
Ambiguous Visibilities All, Analyze 15 15 Minor 70 %
Avoid Optional Properties All, Analyze 21 15 Major 83 %
Cant Inherit Abstract Method All, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP71, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 1 1 Critical 0 %
Child Class Removes Typehint All, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP71, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, Typechecks 4 4 Major 1 %
Const Visibility Usage All, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 6 4 Minor 16 %
Constant Class Analyze, All, Simple, CI-checks 2 2 Minor 49 %
Could Be Abstract Class All, Analyze, ClassReview 3 3 Minor 65 %
Class Could Be Final All, Analyze, ClassReview 166 134 Minor 95 %
Method Could Be Static All, Analyze, ClassReview 173 57 Minor 95 %
Different Argument Counts All, Analyze, ClassReview 1 1 Minor 0 %
No Direct Call To Magic Method Analyze, All, Level 2, CI-checks 2 2 Major 41 %
Don't Send $this In Constructor All, Analyze 2 2 Minor 39 %
Empty Classes Analyze, All, Simple 2 2 Minor 58 %
Class Should Be Final By Ocramius All, Analyze 5 5 Minor 42 %
Hidden Nullable All, Analyze, ClassReview 14 12 Minor 0 %
Incompatible Signature Methods With Covariance All, Analyze 13 13 Critical 0 %
Locally Unused Property Dead code, All, Simple 1 1 Minor 76 %
Assign Default To Properties Analyze, ClearPHP, All, Simple, Level 2 3 2 Minor 49 %
Method Signature Must Be Compatible All, Analyze, LintButWontExec 21 8 Critical 50 %
Missing Abstract Method All, Analyze, ClassReview 8 5 Minor 0 %
No Public Access Analyze, All 2 2 Minor 60 %
Non Nullable Getters All, Analyze, ClassReview 40 29 Minor 0 %
Parent First All, Analyze, Suggestions 1 1 Minor 55 %
Property Could Be Local All, Analyze, ClassReview 48 37 Minor 71 %
Never Used Properties Analyze, All, Simple 1 1 Minor 72 %
Property Used In One Method Only All, Analyze 15 9 Minor 84 %
Redefined Private Property All, Analyze 1 1 Major 18 %
Scalar Or Object Property All, Analyze 2 2 Minor 24 %
Could Use self Analyze, All, Simple, Suggestions, Level 3, ClassReview 119 7 Minor 57 %
Should Use Local Class Analyze, ClearPHP, All, Simple 190 57 Minor 94 %
Static Methods Called From Object Analyze, All, Simple, CI-checks 2 2 Minor 38 %
Undefined Classes Analyze, All 139 60 Major 91 %
Undefined Class Constants Analyze, All, CI-checks 5 2 Major 53 %
Undefined Properties Analyze, ClearPHP, All, Simple, CI-checks 20 7 Major 58 %
Undefined static:: Or self:: Analyze, All, Simple 522 42 Minor 33 %
Unresolved Catch Dead code, ClearPHP, All 1 1 Major 51 %
Unresolved Classes Analyze, All 11 8 Major 86 %
Unresolved Instanceof Analyze, Dead code, ClearPHP, All, Simple, Top10 2 2 Major 48 %
Unused Classes Dead code, All, Simple, Analyze 1 1 Major 72 %
Unused Methods Dead code, All, Simple 642 91 Minor 95 %
Unused Private Methods Dead code, OneFile, All, Simple 11 3 Minor 45 %
Unused Private Properties Dead code, OneFile, All, Simple 2 2 Minor 37 %
Unused Protected Methods Dead code, All 82 46 Major 72 %
Use Class Operator All, Analyze, Performances, Simple, CI-checks 2 1 Minor 74 %
Used Once Property All, Analyze 10 9 Minor 72 %
Weak Typing All, Analyze 2 2 Minor 41 %
Catch Undefined Variable All, Analyze 1 1 Minor 0 %
Undefined Caught Exceptions Dead code, All 1 1 None 50 %
Forgotten Thrown All, Analyze 1 1 Major 30 %
Uncaught Exceptions Analyze, All 63 43 Minor 81 %
Missing Include All, Analyze 1 1 Critical 61 %
Aliases Usage Analyze, ClearPHP, OneFile, All, Simple, Level 1, CI-checks 5 4 Minor 42 %
Use Named Boolean In Argument Definition All, Analyze 185 53 Minor 84 %
Could Make A Function All, Analyze, Suggestions 9 5 Minor 75 %
Empty Function Analyze, All, Simple 32 10 Minor 71 %
Hardcoded Passwords Analyze, OneFile, Security, All, Simple, Level 3 10 5 Major 61 %
Mismatched Default Arguments All, Analyze, Typechecks 68 30 Minor 33 %
Mismatched Typehint All, Analyze, Typechecks 24 15 Major 5 %
Must Return Methods Analyze, All, Simple, Level 2, LintButWontExec, CI-checks 9 4 Major 22 %
Never Used Parameter All, Analyze, Suggestions 72 40 Minor 47 %
No Boolean As Default All, Analyze 185 53 Minor 84 %
No Literal For Reference All, Analyze, CI-checks 1 1 Minor 0 %
No Return Used All, Analyze, Suggestions, Level 4 24 17 Minor 41 %
Only Variable For Reference All, Analyze, LintButWontExec 1 1 Critical 24 %
Only Variable Passed By Reference All, Analyze 1 1 Critical 40 %
Relay Function Analyze, All 106 55 Major 83 %
Typehint Must Be Returned All, Analyze, LintButWontExec, CI-checks 9 4 Major 10 %
Typehinted References All, Analyze, CI-checks 5 5 Minor 12 %
Undefined Functions Analyze, All, CI-checks 14 11 Major 71 %
Unused Arguments Analyze, All, Simple 14 7 Major 89 %
Useless Referenced Argument All, Analyze 5 5 Minor 57 %
Useless Type Check All, Dead code, OneFile 2 1 Minor 0 %
Uses Default Values Analyze, All, Simple, CI-checks 63 36 Minor 97 %
Using Deprecated Method All, Analyze 1 1 Minor 0 %
Methods Without Return All, Analyze 575 73 Minor 0 %
Wrong Number Of Arguments Analyze, OneFile, All, Simple, CI-checks 4 3 Major 38 %
Wrong Optional Parameter Analyze, All, Simple, Level 1, CI-checks 2 2 Minor 38 %
Wrong Returned Type All, Analyze, ClassReview, CI-checks 36 23 Minor 0 %
Wrong Type With Call All, Analyze, Typechecks, CI-checks 74 35 Minor 0 %
Already Parents Interface Analyze, All, Level 3, Suggestions 2 2 Minor 17 %
Forgotten Interface All, Analyze 20 20 Minor 52 %
Empty Interfaces Analyze, All, Simple 16 16 Minor 38 %
Interfaces Is Not Implemented All, Analyze, ClassReview, LintButWontExec, CI-checks 35 35 Minor 0 %
Undefined Interfaces Analyze, All, CI-checks 36 27 Major 67 %
Unused Interfaces Dead code, All, Simple, Suggestions, Level 2 1 1 Minor 25 %
Useless Interfaces Analyze, ClearPHP, All, Simple, ClassReview, Typechecks 38 38 Minor 57 %
Multiple Alias Definitions Analyze, All, Simple, CI-checks 12 11 Minor 42 %
Should Make Alias Analyze, OneFile, All, Simple, CI-checks 56 11 Minor 44 %
Unresolved Use Analyze, ClearPHP, All, Simple 98 72 Major 65 %
Unused Use Dead code, ClearPHP, All, Simple 41 37 Major 54 %
No array_merge() In Loops Analyze, Performances, ClearPHP, All, Simple, Level 2, Top10, CI-checks 1 1 Major 55 %
Logical To in_array All, Analyze, Level 2 1 1 Minor 66 %
Pre-increment Analyze, Performances, All, Simple, Level 4, CI-checks 7 6 Minor 74 %
strpos() Too Much All, Analyze, CI-checks 1 1 Minor 46 %
Assumptions All, Analyze 10 9 Minor 0 %
Use random_int() Analyze, Security, All, CompatibilityPHP71, Simple, Level 2, CI-checks 2 2 Major 59 %
Direct Call To __clone() All, CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 1 1 Critical 3 %
Don't Pollute Global Space All, Analyze 1 1 Minor 0 %
Incompilable Files Analyze, Appinfo, ClearPHP, All, Simple 1 1 Critical 0 %
Wrong Parameter Type Analyze, OneFile, All, Simple, CI-checks 1 1 Major 45 %
Use === null Analyze, OneFile, All, RadwellCodes, Simple, php-cs-fixable, CI-checks 25 17 Minor 52 %
List Short Syntax Internal, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, All, Appinfo 1 1 Major 10 %
No Class In Global All, Analyze, CI-checks 1 1 Minor 78 %
PHP 7.0 Scalar Typehints All, CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 390 128 Critical 31 %
PHP 7.1 Scalar Typehints All, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 10 8 Critical 0 %
PHP Keywords As Names Analyze, All, Simple 341 68 Major 89 %
Use Nullable Type All, Appinfo, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 124 70 Major 21 %
Wrong Type For Native PHP Function All, Analyze, CI-checks 6 6 Minor 0 %
Avoid sleep()/usleep() Security, All 1 1 Minor 39 %
Adding Zero Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 7 4 Minor 33 %
Constant Comparison All, Analyze 5 5 Minor 0 %
Array_merge Needs Array Of Arrays All, Analyze 4 3 Minor 0 %
Bail Out Early All, Analyze, OneFile, Simple, Level 4 20 14 Minor 92 %
Strict Comparison With Booleans Analyze, All, Simple, Suggestions, Level 2, CI-checks 1 1 Minor 76 %
Buried Assignation Analyze, All 1 1 Minor 82 %
Cast To Boolean Analyze, OneFile, All, Simple, Level 1 2 2 Minor 55 %
Check All Types All, Analyze 22 18 Major 68 %
Common Alternatives Analyze, All, Simple 1 1 Major 61 %
Could Use Short Assignation Analyze, OneFile, Performances, All, Simple, CI-checks 2 2 Minor 60 %
Dangling Array References PHP recommendations, Analyze, ClearPHP, All, Simple, Level 1, Top10, CI-checks 8 6 Major 40 %
Dont Change The Blind Var All, Analyze 4 4 Minor 72 %
Dont Mix ++ All, Analyze 1 1 Minor 43 %
Double Instructions Analyze, All, Simple 1 1 Minor 57 %
Drop Else After Return All, Analyze, OneFile, Simple, Suggestions, Level 4, CI-checks 21 14 Minor 70 %
Else If Versus Elseif Analyze, All, Simple, php-cs-fixable, Rector, CI-checks 42 23 Minor 65 %
Empty Blocks Analyze, All, Simple, CI-checks 1 1 Minor 57 %
Empty Instructions Dead code, Analyze, All, Simple 8 8 Minor 43 %
Empty Try Catch Analyze, All, Level 3 3 1 Minor 47 %
Identical Consecutive Expression All, Analyze 11 5 Minor 58 %
Implode() Arguments Order All, Analyze, CI-checks 2 1 Minor 0 %
Infinite Recursion All, Analyze 68 14 Major 0 %
Long Arguments All, Analyze 1 1 Minor 67 %
Max Level Of Nesting All, Analyze 1 1 Minor 0 %
Merge If Then All, Analyze, CI-checks 1 1 Minor 0 %
Mismatched Ternary Alternatives All, Analyze, Suggestions, Level 4 5 4 Major 62 %
Missing New ? All, Analyze 1 1 Critical 5 %
Mixed Concat And Interpolation All, Coding Conventions, Analyze 1 1 Minor 43 %
Multiple Type Variable All, Analyze, Level 4 2 1 Minor 43 %
Nested Ifthen Analyze, All, RadwellCodes 14 10 Major 87 %
No Direct Usage Analyze, All, Simple 1 1 Major 36 %
No Need For Else All, Analyze 29 14 Minor 74 %
No Parenthesis For Language Construct Analyze, ClearPHP, All, RadwellCodes, Simple, Suggestions, Level 2, CI-checks 37 21 Minor 61 %
Variable Is Not A Condition All, Analyze 154 61 Minor 57 %
Objects Don't Need References Analyze, ClearPHP, OneFile, All, Simple, Level 2, Top10, CI-checks 1 1 Minor 31 %
include_once() Usage Analyze, Appinfo, All 2 1 Minor 73 %
Several Instructions On The Same Line Analyze, All 27 5 Major 57 %
Should Make Ternary All, Analyze, OneFile, Simple, CI-checks 3 1 Minor 85 %
Preprocessable Analyze, All, Rector 10 8 Minor 86 %
Static Loop Analyze, All, Simple, Level 4 4 3 Minor 65 %
Suspicious Comparison All, Analyze, Level 3 1 1 Major 15 %
Switch To Switch Analyze, All, RadwellCodes, Simple 1 1 Minor 79 %
Timestamp Difference Analyze, All, Simple, Level 3, CI-checks 1 1 Major 50 %
Unconditional Break In Loop All, Analyze, Level 3, CI-checks 1 1 Major 46 %
Unreachable Code Dead code, OneFile, ClearPHP, All, Simple, Suggestions, Level 3 1 1 Major 44 %
Unsupported Types With Operators All, Analyze, CompatibilityPHP80 15 11 Minor 0 %
Unused Label Dead code, All, Simple 4 3 Minor 1 %
Use Positive Condition All, Analyze, OneFile, Simple 10 7 Minor 81 %
Useless Casting All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4, CI-checks 1 1 Minor 37 %
Useless Parenthesis Analyze, All, Simple, CI-checks 15 11 Minor 81 %
Already Parents Trait All, Analyze 1 1 Minor 0 %
Dependant Trait Analyze, All, Level 3 20 20 Minor 26 %
Method Collision Traits All, Analyze, LintButWontExec 2 2 Critical 2 %
Undefined Trait Analyze, All, LintButWontExec, CI-checks 9 9 Critical 21 %
String May Hold A Variable Analyze, All, Simple 2 1 Minor 58 %
Missing Returntype In Method All, Typehints, Analyze, CI-checks 21 19 Minor 0 %
Assigned Twice All, Analyze 4 2 Minor 78 %
Overwritten Literals Analyze, All 4 2 Major 78 %
Undefined Variable All, Analyze, CI-checks 3 2 Minor 77 %
Used Once Variables Analyze, OneFile, All, Simple, Top10 1 1 Minor 87 %
Used Once Variables (In Scope) Analyze, ClearPHP, OneFile, All, Simple, Level 4 61 18 Minor 95 %
Written Only Variables Analyze, OneFile, All, Simple 19 8 Minor 78 %