PHP Static analysis for red

Label Recipes Issues Files Severity Frequence
Multiple Index Definition Analyze, OneFile, All, Simple, CI-checks 1 1 Minor 25 %
Null Or Boolean Arrays All, Analyze 18 4 Minor 0 %
String Initialization All, CompatibilityPHP71 31 5 Minor 33 %
Too Many Array Dimensions All, Analyze 18 3 Minor 0 %
Ambiguous Visibilities All, Analyze 4 4 Minor 70 %
Avoid Optional Properties All, Analyze 18 4 Major 83 %
Class Could Be Final All, Analyze, ClassReview 12 10 Minor 95 %
Method Could Be Static All, Analyze, ClassReview 128 8 Minor 95 %
Empty Classes Analyze, All, Simple 1 1 Minor 58 %
Locally Unused Property Dead code, All, Simple 14 3 Minor 76 %
Assign Default To Properties Analyze, ClearPHP, All, Simple, Level 2 7 2 Minor 49 %
No Public Access Analyze, All 44 3 Minor 60 %
Forgotten Visibility Analyze, ClearPHP, All, Simple, Level 1, CI-checks 213 5 Minor 42 %
Var Keyword Analyze, OneFile, ClearPHP, All, Simple, Level 1 140 2 Minor 22 %
Never Used Properties Analyze, All, Simple 3 3 Minor 72 %
Property Used In One Method Only All, Analyze 59 6 Minor 84 %
Redefined Default Analyze, All, Simple, CI-checks 7 2 Major 26 %
Should Use Local Class Analyze, ClearPHP, All, Simple 202 8 Minor 94 %
Static Methods Called From Object Analyze, All, Simple, CI-checks 83 5 Minor 38 %
$this Belongs To Classes Or Traits Analyze, All, Simple 1 1 Major 23 %
Undefined Classes Analyze, All 770 8 Major 91 %
Undefined Class Constants Analyze, All, CI-checks 691 6 Major 53 %
Undefined Properties Analyze, ClearPHP, All, Simple, CI-checks 13 2 Major 58 %
Unresolved Catch Dead code, ClearPHP, All 99 3 Major 51 %
Unresolved Classes Analyze, All 110 5 Major 86 %
Unused Class Constant All, Analyze, ClassReview 1 1 Minor 0 %
Unused Methods Dead code, All, Simple 15 6 Minor 95 %
Unused Private Methods Dead code, OneFile, All, Simple 1 1 Minor 45 %
Unused Private Properties Dead code, OneFile, All, Simple 1 1 Minor 37 %
Use Class Operator All, Analyze, Performances, Simple, CI-checks 4 1 Minor 74 %
Used Once Property All, Analyze 24 3 Minor 72 %
Use const Analyze, Coding Conventions, All, Top10, CI-checks 44 4 Minor 57 %
Constants With Strange Names Analyze, All, Simple, CI-checks 27 4 Minor 1 %
Invalid Constant Name Analyze, All, Simple 27 4 Major 1 %
Multiple Constant Definition Analyze, All, Simple, CI-checks 8 3 Minor 32 %
Undefined Constants Analyze, All, Simple, CompatibilityPHP72, CI-checks 15 8 Minor 54 %
Unused Constants Dead code, All, Simple 2 1 Minor 36 %
Undefined Caught Exceptions Dead code, All 98 2 None 50 %
Uncaught Exceptions Analyze, All 4 1 Minor 81 %
Missing Include All, Analyze 190 58 Critical 61 %
Aliases Usage Analyze, ClearPHP, OneFile, All, Simple, Level 1, CI-checks 26 4 Minor 42 %
Use Named Boolean In Argument Definition All, Analyze 11 4 Minor 84 %
Callback Needs Return All, Analyze, CI-checks 1 1 Major 51 %
Could Make A Function All, Analyze, Suggestions 143 23 Minor 75 %
Deep Definitions Analyze, Appinfo, All, Simple 1 1 Major 12 %
Empty Function Analyze, All, Simple 1 1 Minor 71 %
Hardcoded Passwords Analyze, OneFile, Security, All, Simple, Level 3 8 5 Major 61 %
Mismatched Default Arguments All, Analyze, Typechecks 6 5 Minor 33 %
Never Used Parameter All, Analyze, Suggestions 16 5 Minor 47 %
No Boolean As Default All, Analyze 11 4 Minor 84 %
No Literal For Reference All, Analyze, CI-checks 1 1 Minor 0 %
No Return Used All, Analyze, Suggestions, Level 4 6 4 Minor 41 %
Only Variable For Reference All, Analyze, LintButWontExec 4 2 Critical 24 %
Only Variable Passed By Reference All, Analyze 3 1 Critical 40 %
Relay Function Analyze, All 38 1 Major 83 %
Too Many Local Variables All, Analyze 55 6 Minor 65 %
Undefined Functions Analyze, All, CI-checks 20 5 Major 71 %
Unused Arguments Analyze, All, Simple 9 3 Major 89 %
Unused Functions Dead code, All, Simple 4 2 Minor 53 %
Unused Returned Value All, Analyze, OneFile, Dead code, Simple 2 1 Minor 39 %
Useless Referenced Argument All, Analyze 8 3 Minor 57 %
Uses Default Values Analyze, All, Simple, CI-checks 784 42 Minor 97 %
Methods Without Return All, Analyze 116 10 Minor 0 %
Wrong Number Of Arguments Analyze, OneFile, All, Simple, CI-checks 14 7 Major 38 %
Wrong Optional Parameter Analyze, All, Simple, Level 1, CI-checks 1 1 Minor 38 %
Logical To in_array All, Analyze, Level 2 5 4 Minor 66 %
Pre-increment Analyze, Performances, All, Simple, Level 4, CI-checks 65 7 Minor 74 %
strpos() Too Much All, Analyze, CI-checks 5 2 Minor 46 %
array_key_exists() Works On Arrays All, CompatibilityPHP74, Analyze 1 1 Minor 0 %
Use random_int() Analyze, Security, All, CompatibilityPHP71, Simple, Level 2, CI-checks 8 3 Major 59 %
Deprecated Functions Analyze, All, CI-checks 5 2 Major 22 %
Don't Pollute Global Space All, Analyze 173 15 Minor 0 %
Wrong Parameter Type Analyze, OneFile, All, Simple, CI-checks 15 5 Major 45 %
Use === null Analyze, OneFile, All, RadwellCodes, Simple, php-cs-fixable, CI-checks 3 1 Minor 52 %
Logical Should Use Symbolic Operators Analyze, OneFile, ClearPHP, All, Simple, Suggestions, Level 2, Top10, php-cs-fixable, CI-checks 17 6 Minor 42 %
No Class In Global All, Analyze, CI-checks 126 14 Minor 78 %
PHP 7.0 Removed Functions CompatibilityPHP70, CompatibilityPHP71, All 2 1 Major 0 %
PHP 7.2 Deprecations All, CompatibilityPHP72 23 4 Major 1 %
PHP 7.2 Removed Functions All, CompatibilityPHP72 3 2 Major 1 %
PHP 7.4 Removed Functions All, CompatibilityPHP74 1 1 Critical 0 %
PHP 8.0 Removed Functions All, CompatibilityPHP80 3 2 Major 0 %
PHP Keywords As Names Analyze, All, Simple 105 8 Major 89 %
Should Use Coalesce Analyze, All, Simple, Suggestions, Level 3, CI-checks 19 2 Major 71 %
Wrong Type For Native PHP Function All, Analyze, CI-checks 226 14 Minor 0 %
Always Anchor Regex All, Security 26 4 Major 65 %
Avoid Those Hash Functions Security, All 75 7 Major 60 %
Safe Curl Options Security, All 3 2 Major 14 %
Direct Injection Security, All 30 13 Major 41 %
Don't Echo Error All, Analyze, Security, Simple, Level 1, CI-checks 3 3 Critical 32 %
Encoded Simple Letters All, Security 10 4 Minor 40 %
Indirect Injection Security, All 135 12 Critical 21 %
Integer Conversion All, Security 13 2 Major 0 %
Avoid sleep()/usleep() Security, All 1 1 Minor 39 %
No Weak SSL Crypto All, Security 3 2 Minor 0 %
Set Cookie Safe Arguments All, Security 1 1 Major 23 %
Should Use Prepared Statement Analyze, Security, All, Simple, CI-checks 4 1 Major 22 %
Should Use session_regenerateid() All, Security 1 1 Major 82 %
Adding Zero Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 11 4 Minor 33 %
Altering Foreach Without Reference Analyze, ClearPHP, All, Simple, Level 1, CI-checks 3 3 Major 52 %
Alternative Syntax Consistence All, Analyze 1 1 Major 20 %
Array_merge Needs Array Of Arrays All, Analyze 3 1 Minor 0 %
Same Variable Foreach All, Analyze, CI-checks 1 1 Minor 12 %
Bail Out Early All, Analyze, OneFile, Simple, Level 4 5 5 Minor 92 %
Strict Comparison With Booleans Analyze, All, Simple, Suggestions, Level 2, CI-checks 18 9 Minor 76 %
Buried Assignation Analyze, All 83 4 Minor 82 %
Cast To Boolean Analyze, OneFile, All, Simple, Level 1 8 3 Minor 55 %
Check All Types All, Analyze 4 2 Major 68 %
Check JSON All, Analyze, CI-checks 159 7 Major 64 %
Common Alternatives Analyze, All, Simple 77 15 Major 61 %
Concat Empty String All, Analyze, OneFile 1 1 Minor 0 %
Could Be Else All, Analyze 2 2 Minor 48 %
Could Use Short Assignation Analyze, OneFile, Performances, All, Simple, CI-checks 8 3 Minor 60 %
Dont Change The Blind Var All, Analyze 2 2 Minor 72 %
Don't Read And Write In One Expression All, Analyze, CompatibilityPHP73, CompatibilityPHP74 1 1 Critical 38 %
Double Assignation Analyze, All 2 2 Major 55 %
Drop Else After Return All, Analyze, OneFile, Simple, Suggestions, Level 4, CI-checks 6 5 Minor 70 %
Echo With Concat Performances, Analyze, All, Simple, Suggestions 234 29 Minor 58 %
Else If Versus Elseif Analyze, All, Simple, php-cs-fixable, Rector, CI-checks 71 14 Minor 65 %
Empty Blocks Analyze, All, Simple, CI-checks 3 2 Minor 57 %
Empty Instructions Dead code, Analyze, All, Simple 678 74 Minor 43 %
Exit() Usage Analyze, Appinfo, OneFile, ClearPHP, All, CI-checks 22 15 Major 60 %
Switch Fallthrough All, Inventory, Security, Stats 2 1 Minor 37 %
Overwritten Source And Value All, Analyze, OneFile 1 1 Minor 0 %
Forgotten Whitespace Analyze, All, CI-checks 18 18 Minor 15 %
Htmlentities Calls Analyze, All, Simple, CI-checks 6 3 Major 39 %
Identical Conditions Analyze, All, Simple, CI-checks 2 1 Critical 28 %
Identical Consecutive Expression All, Analyze 1 1 Minor 58 %
Identical On Both Sides All, Analyze, CI-checks 1 1 Major 19 %
If With Same Conditions Analyze, All, Simple, CI-checks 1 1 Major 44 %
Iffectations Analyze, All 32 9 Minor 80 %
Implied If Analyze, ClearPHP, All, Simple, CI-checks 1 1 Major 29 %
Implode() Arguments Order All, Analyze, CI-checks 1 1 Minor 0 %
Inconsistent Elseif All, Analyze 18 4 Major 73 %
Invalid Regex All, Analyze, CI-checks 4 2 Major 18 %
Logical Mistakes Analyze, All, Simple, Level 1, CI-checks 1 1 Critical 31 %
Long Arguments All, Analyze 26 6 Minor 67 %
Max Level Of Nesting All, Analyze 30 7 Minor 0 %
Merge If Then All, Analyze, CI-checks 30 14 Minor 0 %
Missing Cases In Switch All, Analyze 2 1 Minor 2 %
Mixed Concat And Interpolation All, Coding Conventions, Analyze 2 2 Minor 43 %
Modernize Empty With Expression All, Analyze, OneFile, Simple 7 6 Minor 56 %
Multiple Type Variable All, Analyze, Level 4 2 2 Minor 43 %
Multiply By One Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 1 1 Minor 17 %
Nested Ifthen Analyze, All, RadwellCodes 176 26 Major 87 %
Nested Ternary Analyze, ClearPHP, All, Simple, Level 1, CI-checks 8 3 Major 20 %
Don't Change Incomings Analyze, All 2 1 Minor 44 %
No Hardcoded Hash Analyze, Security, All, Simple 16 1 Critical 44 %
No Need For Else All, Analyze 8 5 Minor 74 %
No Parenthesis For Language Construct Analyze, ClearPHP, All, RadwellCodes, Simple, Suggestions, Level 2, CI-checks 370 46 Minor 61 %
Avoid Substr() One Analyze, Performances, All, CompatibilityPHP71, Simple, Level 2, Suggestions, Top10, CI-checks 14 3 Minor 57 %
Variable Is Not A Condition All, Analyze 205 31 Minor 57 %
@ Operator Appinfo, ClearPHP, All, Analyze, Performances, CI-checks 7 3 Minor 66 %
include_once() Usage Analyze, Appinfo, All 234 80 Minor 73 %
Several Instructions On The Same Line Analyze, All 61 16 Major 57 %
Or Die Analyze, OneFile, ClearPHP, All, Simple, CI-checks 1 1 Minor 13 %
Repeated print() Analyze, All, Simple, Suggestions, Level 3, Top10, CI-checks 1 1 Major 49 %
Repeated Regex All, Analyze, Level 1, CI-checks 12 1 Minor 47 %
Results May Be Missing Analyze, All, Simple, CI-checks 1 1 Major 18 %
Return True False Analyze, All, Simple, Level 1, CI-checks 5 5 Major 53 %
Same Conditions In Condition Analyze, All, Simple, CI-checks 7 4 Critical 49 %
Should Make Ternary All, Analyze, OneFile, Simple, CI-checks 65 14 Minor 85 %
Preprocessable Analyze, All, Rector 67 29 Minor 86 %
Static Loop Analyze, All, Simple, Level 4 8 1 Minor 65 %
Switch To Switch Analyze, All, RadwellCodes, Simple 14 5 Minor 79 %
Switch Without Default Analyze, ClearPHP, All, Simple, CI-checks 7 3 Major 68 %
Unchecked Resources Analyze, ClearPHP, All, Simple, Level 2, CI-checks 1 1 Major 49 %
Unreachable Code Dead code, OneFile, ClearPHP, All, Simple, Suggestions, Level 3 2 2 Major 44 %
Use Positive Condition All, Analyze, OneFile, Simple 19 7 Minor 81 %
Useless Instructions Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 4 3 Minor 58 %
Useless Parenthesis Analyze, All, Simple, CI-checks 289 18 Minor 81 %
var_dump()... Usage Analyze, ClearPHP, Security, All, CI-checks 6 2 Critical 40 %
While(List() = Each()) Analyze, Performances, OneFile, All, Simple, Suggestions, Level 2, CI-checks 3 2 Minor 15 %
preg_replace With Option e Analyze, CompatibilityPHP70, Security, CompatibilityPHP71, All, Simple, CompatibilityPHP72, CI-checks 4 2 Major 8 %
Should Typecast Analyze, OneFile, All, Simple, CI-checks 30 2 Minor 47 %
Assigned Twice All, Analyze 178 7 Minor 78 %
Overwritten Literals Analyze, All 222 7 Major 78 %
Undefined Variable All, Analyze, CI-checks 342 75 Minor 77 %
Used Once Variables Analyze, OneFile, All, Simple, Top10 17 7 Minor 87 %
Used Once Variables (In Scope) Analyze, ClearPHP, OneFile, All, Simple, Level 4 302 86 Minor 95 %
Written Only Variables Analyze, OneFile, All, Simple 79 7 Minor 78 %