PHP Static analysis for koseven

Label Recipes Issues Files Severity Frequence
Ambiguous Array Index Analyze, All, Simple, Level 2 7 3 Minor 9 %
Multiple Index Definition Analyze, OneFile, All, Simple, CI-checks 2 2 Minor 25 %
Non-constant Index In Array Analyze, All, Simple 8 1 Minor 26 %
Null Or Boolean Arrays All, Analyze 16 7 Minor 0 %
Randomly Sorted Arrays All, Analyze, Level 4, Suggestions 8 2 Minor 41 %
String Initialization All, CompatibilityPHP71 64 18 Minor 33 %
Too Many Array Dimensions All, Analyze 10 1 Minor 0 %
Ambiguous Static All, Analyze 175 86 Minor 64 %
Ambiguous Visibilities All, Analyze 5 5 Minor 70 %
Avoid option arrays in constructors All, Analyze, ClassReview 4 4 Minor 0 %
Avoid Optional Properties All, Analyze 46 23 Major 83 %
Cant Instantiate Class All, Analyze 1 1 Critical 28 %
Child Class Removes Typehint All, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP71, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, Typechecks 16 9 Major 1 %
Clone With Non-Object All, Analyze, LintButWontExec 1 1 Minor 0 %
Constant Class Analyze, All, Simple, CI-checks 1 1 Minor 49 %
Could Be Abstract Class All, Analyze, ClassReview 147 146 Minor 65 %
Class Could Be Final All, Analyze, ClassReview 210 202 Minor 95 %
Method Could Be Static All, Analyze, ClassReview 184 81 Minor 95 %
Cyclic References All, Analyze, ClassReview 2 2 Minor 0 %
Dependant Abstract Classes All, Analyze, ClassReview 7 7 Minor 0 %
Different Argument Counts All, Analyze, ClassReview 4 4 Minor 0 %
No Direct Call To Magic Method Analyze, All, Level 2, CI-checks 9 5 Major 41 %
Don't Send $this In Constructor All, Analyze 5 5 Minor 39 %
Empty Classes Analyze, All, Simple 117 117 Minor 58 %
Hidden Nullable All, Analyze, ClassReview 101 45 Minor 0 %
Incompatible Signature Methods With Covariance All, Analyze 16 15 Critical 0 %
Locally Unused Property Dead code, All, Simple 201 105 Minor 76 %
Assign Default To Properties Analyze, ClearPHP, All, Simple, Level 2 10 9 Minor 49 %
Make Global A Property Analyze, All, Simple 1 1 Minor 33 %
Method Signature Must Be Compatible All, Analyze, LintButWontExec 9 9 Critical 50 %
No Public Access Analyze, All 117 52 Minor 60 %
Forgotten Visibility Analyze, ClearPHP, All, Simple, Level 1, CI-checks 166 7 Minor 42 %
Var Keyword Analyze, OneFile, ClearPHP, All, Simple, Level 1 44 1 Minor 22 %
Parent First All, Analyze, Suggestions 21 21 Minor 55 %
Never Used Properties Analyze, All, Simple 107 45 Minor 72 %
Property Used In One Method Only All, Analyze 68 27 Minor 84 %
Scalar Or Object Property All, Analyze 3 3 Minor 24 %
Could Use self Analyze, All, Simple, Suggestions, Level 3, ClassReview 34 18 Minor 57 %
Should Use Local Class Analyze, ClearPHP, All, Simple 649 127 Minor 94 %
Static Methods Called From Object Analyze, All, Simple, CI-checks 12 7 Minor 38 %
Undefined Classes Analyze, All 114 42 Major 91 %
Undefined Class Constants Analyze, All, CI-checks 40 7 Major 53 %
Undefined Parent Analyze, All, Simple 2 1 Minor 63 %
Undefined Properties Analyze, ClearPHP, All, Simple, CI-checks 23 8 Major 58 %
Undefined static:: Or self:: Analyze, All, Simple 4 3 Minor 33 %
Unresolved Catch Dead code, ClearPHP, All 13 3 Major 51 %
Unresolved Classes Analyze, All 51 26 Major 86 %
Unresolved Instanceof Analyze, Dead code, ClearPHP, All, Simple, Top10 2 2 Major 48 %
Unused Classes Dead code, All, Simple, Analyze 60 60 Major 72 %
Unused Class Constant All, Analyze, ClassReview 7 3 Minor 0 %
Unused Methods Dead code, All, Simple 1066 164 Minor 95 %
Unused Protected Methods Dead code, All 30 17 Major 72 %
Use Class Operator All, Analyze, Performances, Simple, CI-checks 461 99 Minor 74 %
Use Instanceof Analyze, All, Simple, CI-checks 28 23 Major 63 %
Used Once Property All, Analyze 25 10 Minor 72 %
Useless Abstract Class Analyze, All, Simple 23 23 Minor 60 %
Weak Typing All, Analyze 3 3 Minor 41 %
Illegal Name For Method All, Analyze, OneFile, Simple 1 1 Major 19 %
Use const Analyze, Coding Conventions, All, Top10, CI-checks 13 3 Minor 57 %
Constants With Strange Names Analyze, All, Simple, CI-checks 12 3 Minor 1 %
Invalid Constant Name Analyze, All, Simple 12 3 Major 1 %
Multiple Constant Definition Analyze, All, Simple, CI-checks 20 3 Minor 32 %
Undefined Constants Analyze, All, Simple, CompatibilityPHP72, CI-checks 105 17 Minor 54 %
Unused Constants Dead code, All, Simple 1 1 Minor 36 %
Catch Undefined Variable All, Analyze 7 1 Minor 0 %
Undefined Caught Exceptions Dead code, All 15 5 None 50 %
Forgotten Thrown All, Analyze 2 2 Major 30 %
Throw Functioncall Analyze, All, Simple, Level 1, CI-checks 5 3 Major 3 %
Uncaught Exceptions Analyze, All 112 49 Minor 81 %
Unthrown Exception Analyze, Dead code, ClearPHP, All, Simple 94 94 Minor 43 %
Useless Catch All, Analyze, CI-checks 2 2 Minor 47 %
ext/mcrypt Appinfo, All, CompatibilityPHP71 73 4 Major 14 %
Missing Include All, Analyze 8 4 Critical 61 %
Use Named Boolean In Argument Definition All, Analyze 101 40 Minor 84 %
Could Make A Function All, Analyze, Suggestions 436 54 Minor 75 %
Empty Function Analyze, All, Simple 9 7 Minor 71 %
Hardcoded Passwords Analyze, OneFile, Security, All, Simple, Level 3 86 24 Major 61 %
Insufficient Typehint All, Analyze, Typechecks 2 2 Major 24 %
Mismatch Parameter And Type All, Analyze, Semantics 1 1 Minor 0 %
Mismatch Parameter Name All, Analyze, CompatibilityPHP80 6 5 Minor 0 %
Mismatched Default Arguments All, Analyze, Typechecks 240 77 Minor 33 %
Mismatched Typehint All, Analyze, Typechecks 55 25 Major 5 %
Modified Typed Parameter All, Analyze, ClassReview 5 4 Minor 0 %
Never Used Parameter All, Analyze, Suggestions 116 74 Minor 47 %
No Boolean As Default All, Analyze 101 40 Minor 84 %
No Return Used All, Analyze, Suggestions, Level 4 29 21 Minor 41 %
Only Variable Passed By Reference All, Analyze 6 5 Critical 40 %
Relay Function Analyze, All 52 27 Major 83 %
Too Many Local Variables All, Analyze 3 2 Minor 65 %
Typehinted References All, Analyze, CI-checks 2 2 Minor 12 %
Undefined Functions Analyze, All, CI-checks 551 110 Major 71 %
Unused Arguments Analyze, All, Simple 36 17 Major 89 %
Unused Functions Dead code, All, Simple 2 1 Minor 53 %
Use Constant As Arguments Analyze, All, Simple, CI-checks 1 1 Major 25 %
Useless Referenced Argument All, Analyze 6 5 Minor 57 %
Useless Return Analyze, OneFile, All, Simple, Level 4 3 3 Minor 29 %
Uses Default Values Analyze, All, Simple, CI-checks 902 147 Minor 97 %
Using Deprecated Method All, Analyze 8 6 Minor 0 %
Methods Without Return All, Analyze 517 104 Minor 0 %
Wrong Number Of Arguments Analyze, OneFile, All, Simple, CI-checks 56 30 Major 38 %
Wrong Optional Parameter Analyze, All, Simple, Level 1, CI-checks 2 1 Minor 38 %
Wrong Type With Call All, Analyze, Typechecks, CI-checks 19 16 Minor 0 %
Forgotten Interface All, Analyze 2 2 Minor 52 %
Empty Interfaces Analyze, All, Simple 7 7 Minor 38 %
Undefined Interfaces Analyze, All, CI-checks 12 9 Major 67 %
Useless Interfaces Analyze, ClearPHP, All, Simple, ClassReview, Typechecks 9 9 Minor 57 %
Multiple Alias Definitions Analyze, All, Simple, CI-checks 3 3 Minor 42 %
Unresolved Use Analyze, ClearPHP, All, Simple 5 4 Major 65 %
No array_merge() In Loops Analyze, Performances, ClearPHP, All, Simple, Level 2, Top10, CI-checks 4 4 Major 55 %
Logical To in_array All, Analyze, Level 2 15 9 Minor 66 %
Pre-increment Analyze, Performances, All, Simple, Level 4, CI-checks 30 18 Minor 74 %
strpos() Too Much All, Analyze, CI-checks 7 2 Minor 46 %
array_key_exists() Works On Arrays All, CompatibilityPHP74, Analyze 16 9 Minor 0 %
Assign With And All, Analyze, CI-checks 8 4 Critical 8 %
Assumptions All, Analyze 25 18 Minor 0 %
Use random_int() Analyze, Security, All, CompatibilityPHP71, Simple, Level 2, CI-checks 22 8 Major 59 %
Detect Current Class All, Suggestions, CompatibilityPHP74 3 2 None 47 %
Don't Pollute Global Space All, Analyze 562 449 Minor 0 %
Wrong fopen() Mode Analyze, All, CI-checks 2 1 Major 16 %
Wrong Parameter Type Analyze, OneFile, All, Simple, CI-checks 74 32 Major 45 %
List With Keys CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, Appcontent, Appinfo, All 2 2 Major 32 %
Logical Should Use Symbolic Operators Analyze, OneFile, ClearPHP, All, Simple, Suggestions, Level 2, Top10, php-cs-fixable, CI-checks 317 90 Minor 42 %
Possible Missing Subpattern All, Analyze, Top10, CI-checks 22 16 Minor 40 %
No Class In Global All, Analyze, CI-checks 467 447 Minor 78 %
No More Curly Arrays All, CompatibilityPHP74 21 2 Minor 0 %
mb_strrpos() Third Argument All, CompatibilityPHP74 1 1 Minor 0 %
Php7 Relaxed Keyword CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, All, Appinfo 1 1 Major 25 %
PHP 8.0 Removed Constants All, CompatibilityPHP80 1 1 Critical 0 %
PHP 8.0 Removed Directives All, CompatibilityPHP80 1 1 Minor 0 %
PHP Keywords As Names Analyze, All, Simple 474 86 Major 89 %
Scalar Are Not Arrays All, Analyze, CompatibilityPHP74, CI-checks 131 15 Minor 0 %
Should Use Coalesce Analyze, All, Simple, Suggestions, Level 3, CI-checks 27 14 Major 71 %
Unknown Pcre2 Option All, Analyze, CompatibilityPHP73 3 1 Minor 15 %
Use Nullable Type All, Appinfo, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 321 106 Major 21 %
Use PHP Object API Analyze, ClearPHP, All, Simple, CI-checks 2 2 Minor 23 %
Avoid Using stdClass All, Analyze, OneFile, Simple, Level 4 6 6 Minor 45 %
Usort Sorting In PHP 7.0 CompatibilityPHP70, All 2 1 Major 46 %
Wrong Type For Native PHP Function All, Analyze, CI-checks 86 47 Minor 0 %
Always Anchor Regex All, Security 24 16 Major 65 %
Avoid Those Hash Functions Security, All 13 12 Major 60 %
Configure Extract All, Security 5 4 Minor 22 %
Direct Injection Security, All 6 5 Major 41 %
Encoded Simple Letters All, Security 5 3 Minor 40 %
filter_input() As A Source All, Security 1 1 Minor 6 %
Keep Files Access Restricted All, Security 9 3 Minor 0 %
No ENT_IGNORE All, Security 1 1 Minor 0 %
No Net For Xml Load All, Security 75 39 Major 49 %
Avoid sleep()/usleep() Security, All 5 4 Minor 39 %
Should Use Prepared Statement Analyze, Security, All, Simple, CI-checks 3 1 Major 22 %
Unserialize Second Arg Security, All 6 5 Critical 49 %
Adding Zero Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 34 18 Minor 33 %
Altering Foreach Without Reference Analyze, ClearPHP, All, Simple, Level 1, CI-checks 15 11 Major 52 %
Alternative Syntax Consistence All, Analyze 6 1 Major 20 %
Constant Comparison All, Analyze 2 2 Minor 0 %
Array_merge Needs Array Of Arrays All, Analyze 6 4 Minor 0 %
Assign And Compare All, Analyze, CI-checks 1 1 Minor 17 %
Same Variable Foreach All, Analyze, CI-checks 1 1 Minor 12 %
Bail Out Early All, Analyze, OneFile, Simple, Level 4 5 4 Minor 92 %
Strict Comparison With Booleans Analyze, All, Simple, Suggestions, Level 2, CI-checks 35 23 Minor 76 %
Buried Assignation Analyze, All 91 44 Minor 82 %
Cast To Boolean Analyze, OneFile, All, Simple, Level 1 2 2 Minor 55 %
Casting Ternary All, Analyze, OneFile, CI-checks 2 2 Major 0 %
Catch Overwrite Variable Analyze, ClearPHP, All, Simple 3 2 Minor 23 %
Check All Types All, Analyze 58 30 Major 68 %
Check JSON All, Analyze, CI-checks 12 3 Major 64 %
Common Alternatives Analyze, All, Simple 109 19 Major 61 %
Concat Empty String All, Analyze, OneFile 1 1 Minor 0 %
Could Be Else All, Analyze 3 3 Minor 48 %
Could Use __DIR__ Analyze, All, Simple, Suggestions, Level 3, php-cs-fixable, CI-checks 2 2 Major 56 %
Could Use Short Assignation Analyze, OneFile, Performances, All, Simple, CI-checks 18 11 Minor 60 %
Dangling Array References PHP recommendations, Analyze, ClearPHP, All, Simple, Level 1, Top10, CI-checks 7 4 Major 40 %
Dont Change The Blind Var All, Analyze 27 15 Minor 72 %
Dont Mix ++ All, Analyze 11 10 Minor 43 %
Don't Read And Write In One Expression All, Analyze, CompatibilityPHP73, CompatibilityPHP74 3 3 Critical 38 %
Double Assignation Analyze, All 1 1 Major 55 %
Double Instructions Analyze, All, Simple 1 1 Minor 57 %
Double Object Assignation All, Analyze, ClassReview 3 3 Minor 0 %
Drop Else After Return All, Analyze, OneFile, Simple, Suggestions, Level 4, CI-checks 33 19 Minor 70 %
Echo With Concat Performances, Analyze, All, Simple, Suggestions 11 6 Minor 58 %
Else If Versus Elseif Analyze, All, Simple, php-cs-fixable, Rector, CI-checks 31 17 Minor 65 %
Empty Blocks Analyze, All, Simple, CI-checks 8 6 Minor 57 %
Empty Instructions Dead code, Analyze, All, Simple 472 19 Minor 43 %
Empty Try Catch Analyze, All, Level 3 6 5 Minor 47 %
Eval() Usage Analyze, Appinfo, Performances, OneFile, ClearPHP, All, Simple, Security 2 1 Major 37 %
eval() Without Try Analyze, All, Simple, Level 3, Security, CI-checks 2 1 Critical 34 %
Exit() Usage Analyze, Appinfo, OneFile, ClearPHP, All, CI-checks 9 6 Major 60 %
Switch Fallthrough All, Inventory, Security, Stats 1 1 Minor 37 %
Overwritten Source And Value All, Analyze, OneFile 1 1 Minor 0 %
Forgotten Whitespace Analyze, All, CI-checks 1 1 Minor 15 %
Global Usage Analyze, Appinfo, ClearPHP, All 9 2 Minor 52 %
Htmlentities Calls Analyze, All, Simple, CI-checks 3 1 Major 39 %
Identical Consecutive Expression All, Analyze 8 3 Minor 58 %
If With Same Conditions Analyze, All, Simple, CI-checks 1 1 Major 44 %
Iffectations Analyze, All 101 47 Minor 80 %
Implied If Analyze, ClearPHP, All, Simple, CI-checks 23 7 Major 29 %
Implode() Arguments Order All, Analyze, CI-checks 1 1 Minor 0 %
Inconsistent Elseif All, Analyze 25 18 Major 73 %
Indices Are Int Or String Analyze, OneFile, All, Simple, CI-checks 5 2 Major 18 %
Infinite Recursion All, Analyze 1 1 Major 0 %
Invalid Regex All, Analyze, CI-checks 1 1 Major 18 %
Long Arguments All, Analyze 41 7 Minor 67 %
Max Level Of Nesting All, Analyze 23 17 Minor 0 %
Mbstring Unknown Encoding All, Analyze, CI-checks 1 1 Minor 0 %
Merge If Then All, Analyze, CI-checks 42 27 Minor 0 %
Mismatched Ternary Alternatives All, Analyze, Suggestions, Level 4 14 9 Major 62 %
Missing New ? All, Analyze 18 8 Critical 5 %
Mixed Concat And Interpolation All, Coding Conventions, Analyze 2 1 Minor 43 %
Modernize Empty With Expression All, Analyze, OneFile, Simple 7 5 Minor 56 %
Multiple Type Variable All, Analyze, Level 4 5 5 Minor 43 %
Nested Ifthen Analyze, All, RadwellCodes 56 29 Major 87 %
Nested Ternary Analyze, ClearPHP, All, Simple, Level 1, CI-checks 2 2 Major 20 %
Don't Change Incomings Analyze, All 14 7 Minor 44 %
No Choice Analyze, All, Simple, Level 2, Top10, CI-checks 2 2 Major 43 %
No Direct Usage Analyze, All, Simple 1 1 Major 36 %
No Hardcoded Hash Analyze, Security, All, Simple 102 5 Critical 44 %
No Hardcoded Ip Analyze, ClearPHP, Security, All, Simple 15 3 Minor 24 %
No Hardcoded Path Analyze, ClearPHP, All, Simple 1 1 Major 33 %
No Hardcoded Port Analyze, ClearPHP, Security, All, Simple 1 1 Minor 11 %
No Need For Else All, Analyze 63 25 Minor 74 %
No Parenthesis For Language Construct Analyze, ClearPHP, All, RadwellCodes, Simple, Suggestions, Level 2, CI-checks 36 22 Minor 61 %
Avoid Substr() One Analyze, Performances, All, CompatibilityPHP71, Simple, Level 2, Suggestions, Top10, CI-checks 4 3 Minor 57 %
Variable Is Not A Condition All, Analyze 123 60 Minor 57 %
@ Operator Appinfo, ClearPHP, All, Analyze, Performances, CI-checks 14 4 Minor 66 %
Not Not Analyze, OneFile, All, Simple, CI-checks 1 1 Minor 13 %
include_once() Usage Analyze, Appinfo, All 13 12 Minor 73 %
Several Instructions On The Same Line Analyze, All 43 13 Major 57 %
Or Die Analyze, OneFile, ClearPHP, All, Simple, CI-checks 1 1 Minor 13 %
Random Without Try Security, All 2 2 Critical 21 %
Repeated print() Analyze, All, Simple, Suggestions, Level 3, Top10, CI-checks 3 1 Major 49 %
Repeated Regex All, Analyze, Level 1, CI-checks 10 4 Minor 47 %
Results May Be Missing Analyze, All, Simple, CI-checks 3 3 Major 18 %
Return True False Analyze, All, Simple, Level 1, CI-checks 1 1 Major 53 %
Same Conditions In Condition Analyze, All, Simple, CI-checks 2 2 Critical 49 %
Should Chain Exception Analyze, All, Simple, CI-checks 21 7 Minor 36 %
Should Make Ternary All, Analyze, OneFile, Simple, CI-checks 68 39 Minor 85 %
Preprocessable Analyze, All, Rector 996 40 Minor 86 %
Static Loop Analyze, All, Simple, Level 4 13 8 Minor 65 %
Strpos()-like Comparison Analyze, PHP recommendations, ClearPHP, All, Simple, Level 2, Top10, CI-checks 13 8 Major 54 %
Switch To Switch Analyze, All, RadwellCodes, Simple 11 8 Minor 79 %
Switch Without Default Analyze, ClearPHP, All, Simple, CI-checks 12 8 Major 68 %
Timestamp Difference Analyze, All, Simple, Level 3, CI-checks 11 8 Major 50 %
Unchecked Resources Analyze, ClearPHP, All, Simple, Level 2, CI-checks 6 4 Major 49 %
Unpreprocessed Values Analyze, OneFile, ClearPHP, All, Simple 1 1 Minor 28 %
Unreachable Code Dead code, OneFile, ClearPHP, All, Simple, Suggestions, Level 3 7 6 Major 44 %
Unsupported Types With Operators All, Analyze, CompatibilityPHP80 18 10 Minor 0 %
Use Constant PHP recommendations, All, Analyze, php-cs-fixable, CI-checks 2 2 Minor 0 %
Use Positive Condition All, Analyze, OneFile, Simple 35 23 Minor 81 %
Useless Casting All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4, CI-checks 15 11 Minor 37 %
Useless Check All, Analyze, OneFile, Simple, Level 1, CI-checks 1 1 Minor 48 %
Useless Instructions Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 1 1 Minor 58 %
Useless Parenthesis Analyze, All, Simple, CI-checks 83 31 Minor 81 %
Useless Unset Analyze, OneFile, ClearPHP, All, Simple, Level 2, CI-checks 1 1 Major 28 %
var_dump()... Usage Analyze, ClearPHP, Security, All, CI-checks 2 1 Critical 40 %
preg_replace With Option e Analyze, CompatibilityPHP70, Security, CompatibilityPHP71, All, Simple, CompatibilityPHP72, CI-checks 1 1 Major 8 %
No Real Comparison Analyze, All, Simple, Level 2, Top10, CI-checks 1 1 Major 22 %
One Variable String Analyze, All, RadwellCodes, Simple, CI-checks 3 2 Minor 29 %
Should Typecast Analyze, OneFile, All, Simple, CI-checks 6 3 Minor 47 %
String May Hold A Variable Analyze, All, Simple 46 14 Minor 58 %
Missing Returntype In Method All, Typehints, Analyze, CI-checks 1 1 Minor 0 %
Assigned Twice All, Analyze 94 14 Minor 78 %
Lost References Analyze, All, Simple 1 1 Major 14 %
Overwritten Literals Analyze, All 129 14 Major 78 %
Strange Name For Variables All, Analyze 3 3 Minor 28 %
Undefined Variable All, Analyze, CI-checks 180 30 Minor 77 %
Used Once Variables Analyze, OneFile, All, Simple, Top10 12 6 Minor 87 %
Used Once Variables (In Scope) Analyze, ClearPHP, OneFile, All, Simple, Level 4 162 57 Minor 95 %
Written Only Variables Analyze, OneFile, All, Simple 85 28 Minor 78 %