PHP Static analysis for mpg

Label Recipes Issues Files Severity Frequence
Null Or Boolean Arrays All, Analyze 17 2 Minor 0 %
String Initialization All, CompatibilityPHP71 1 1 Minor 33 %
Avoid Optional Properties All, Analyze 7 1 Major 83 %
Constant Class Analyze, All, Simple, CI-checks 1 1 Minor 49 %
Class Could Be Final All, Analyze, ClassReview 20 20 Minor 95 %
Method Could Be Static All, Analyze, ClassReview 2 1 Minor 95 %
Empty Classes Analyze, All, Simple 1 1 Minor 58 %
Locally Unused Property Dead code, All, Simple 2 1 Minor 76 %
Make Global A Property Analyze, All, Simple 28 11 Minor 33 %
No Public Access Analyze, All 5 1 Minor 60 %
Property Could Be Local All, Analyze, ClassReview 1 1 Minor 71 %
Never Used Properties Analyze, All, Simple 2 1 Minor 72 %
Property Used In One Method Only All, Analyze 2 2 Minor 84 %
Could Use self Analyze, All, Simple, Suggestions, Level 3, ClassReview 11 5 Minor 57 %
Should Use Local Class Analyze, ClearPHP, All, Simple 90 19 Minor 94 %
Undefined Classes Analyze, All 17 7 Major 91 %
Undefined Class Constants Analyze, All, CI-checks 6 3 Major 53 %
Unresolved Classes Analyze, All 3 2 Major 86 %
Unused Methods Dead code, All, Simple 4 3 Minor 95 %
Unused Private Properties Dead code, OneFile, All, Simple 2 1 Minor 37 %
Use Class Operator All, Analyze, Performances, Simple, CI-checks 47 2 Minor 74 %
Use const Analyze, Coding Conventions, All, Top10, CI-checks 1 1 Minor 57 %
Constants With Strange Names Analyze, All, Simple, CI-checks 1 1 Minor 1 %
Invalid Constant Name Analyze, All, Simple 1 1 Major 1 %
Undefined Constants Analyze, All, Simple, CompatibilityPHP72, CI-checks 53 16 Minor 54 %
Catch Undefined Variable All, Analyze 4 1 Minor 0 %
Forgotten Thrown All, Analyze 1 1 Major 30 %
Throw Functioncall Analyze, All, Simple, Level 1, CI-checks 1 1 Major 3 %
Uncaught Exceptions Analyze, All 56 13 Minor 81 %
Missing Include All, Analyze 34 11 Critical 61 %
Aliases Usage Analyze, ClearPHP, OneFile, All, Simple, Level 1, CI-checks 3 1 Minor 42 %
Use Named Boolean In Argument Definition All, Analyze 1 1 Minor 84 %
Could Make A Function All, Analyze, Suggestions 272 30 Minor 75 %
Deep Definitions Analyze, Appinfo, All, Simple 2 2 Major 12 %
Mismatched Default Arguments All, Analyze, Typechecks 4 1 Minor 33 %
Never Used Parameter All, Analyze, Suggestions 1 1 Minor 47 %
No Boolean As Default All, Analyze 1 1 Minor 84 %
Relay Function Analyze, All 1 1 Major 83 %
Too Many Local Variables All, Analyze 8 5 Minor 65 %
Undefined Functions Analyze, All, CI-checks 642 33 Major 71 %
Unused Arguments Analyze, All, Simple 9 3 Major 89 %
Unused Returned Value All, Analyze, OneFile, Dead code, Simple 1 1 Minor 39 %
Uses Default Values Analyze, All, Simple, CI-checks 247 15 Minor 97 %
Methods Without Return All, Analyze 70 17 Minor 0 %
Wrong Number Of Arguments Analyze, OneFile, All, Simple, CI-checks 1 1 Major 38 %
Wrong Type With Call All, Analyze, Typechecks, CI-checks 37 2 Minor 0 %
Hidden Use Expression Analyze, OneFile, All, Simple, CI-checks 4 2 Minor 24 %
Unresolved Use Analyze, ClearPHP, All, Simple 4 2 Major 65 %
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 3 2 Minor 66 %
Pre-increment Analyze, Performances, All, Simple, Level 4, CI-checks 1 1 Minor 74 %
strpos() Too Much All, Analyze, CI-checks 5 4 Minor 46 %
Use random_int() Analyze, Security, All, CompatibilityPHP71, Simple, Level 2, CI-checks 4 2 Major 59 %
Don't Pollute Global Space All, Analyze 33 21 Minor 0 %
Wrong Parameter Type Analyze, OneFile, All, Simple, CI-checks 7 4 Major 45 %
Use === null Analyze, OneFile, All, RadwellCodes, Simple, php-cs-fixable, CI-checks 4 1 Minor 52 %
Logical Should Use Symbolic Operators Analyze, OneFile, ClearPHP, All, Simple, Suggestions, Level 2, Top10, php-cs-fixable, CI-checks 3 3 Minor 42 %
No Class In Global All, Analyze, CI-checks 23 21 Minor 78 %
PHP Keywords As Names Analyze, All, Simple 10 5 Major 89 %
Scalar Are Not Arrays All, Analyze, CompatibilityPHP74, CI-checks 1 1 Minor 0 %
Should Use Coalesce Analyze, All, Simple, Suggestions, Level 3, CI-checks 21 5 Major 71 %
Use Nullable Type All, Appinfo, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 5 4 Major 21 %
Wrong Type For Native PHP Function All, Analyze, CI-checks 8 5 Minor 0 %
Always Anchor Regex All, Security 2 1 Major 65 %
Safe Curl Options Security, All 2 1 Major 14 %
Direct Injection Security, All 4 3 Major 41 %
Don't Echo Error All, Analyze, Security, Simple, Level 1, CI-checks 1 1 Critical 32 %
filter_input() As A Source All, Security 2 1 Minor 6 %
Indirect Injection Security, All 2 1 Critical 21 %
Mkdir Default All, Security 5 2 Major 35 %
Adding Zero Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 1 1 Minor 33 %
Altering Foreach Without Reference Analyze, ClearPHP, All, Simple, Level 1, CI-checks 2 2 Major 52 %
Array_merge Needs Array Of Arrays All, Analyze 3 2 Minor 0 %
Bail Out Early All, Analyze, OneFile, Simple, Level 4 2 2 Minor 92 %
Strict Comparison With Booleans Analyze, All, Simple, Suggestions, Level 2, CI-checks 9 5 Minor 76 %
Buried Assignation Analyze, All 1 1 Minor 82 %
Casting Ternary All, Analyze, OneFile, CI-checks 1 1 Major 0 %
Check All Types All, Analyze 2 2 Major 68 %
Check JSON All, Analyze, CI-checks 6 1 Major 64 %
Common Alternatives Analyze, All, Simple 19 10 Major 61 %
Could Be Else All, Analyze 1 1 Minor 48 %
Could Be Static Analyze, OneFile, All, ClassReview 4 3 Major 20 %
Could Use Short Assignation Analyze, OneFile, Performances, All, Simple, CI-checks 1 1 Minor 60 %
Dont Change The Blind Var All, Analyze 1 1 Minor 72 %
Drop Else After Return All, Analyze, OneFile, Simple, Suggestions, Level 4, CI-checks 1 1 Minor 70 %
Echo With Concat Performances, Analyze, All, Simple, Suggestions 6 4 Minor 58 %
Else If Versus Elseif Analyze, All, Simple, php-cs-fixable, Rector, CI-checks 3 3 Minor 65 %
Empty Instructions Dead code, Analyze, All, Simple 259 16 Minor 43 %
Empty Try Catch Analyze, All, Level 3 1 1 Minor 47 %
Exit() Usage Analyze, Appinfo, OneFile, ClearPHP, All, CI-checks 2 1 Major 60 %
Global Usage Analyze, Appinfo, ClearPHP, All 34 14 Minor 52 %
Htmlentities Calls Analyze, All, Simple, CI-checks 1 1 Major 39 %
Long Arguments All, Analyze 38 14 Minor 67 %
Max Level Of Nesting All, Analyze 5 4 Minor 0 %
Merge If Then All, Analyze, CI-checks 4 3 Minor 0 %
Mismatched Ternary Alternatives All, Analyze, Suggestions, Level 4 2 2 Major 62 %
Mixed Concat And Interpolation All, Coding Conventions, Analyze 1 1 Minor 43 %
Modernize Empty With Expression All, Analyze, OneFile, Simple 4 3 Minor 56 %
Nested Ifthen Analyze, All, RadwellCodes 8 7 Major 87 %
No Direct Usage Analyze, All, Simple 2 1 Major 36 %
No Hardcoded Hash Analyze, Security, All, Simple 1 1 Critical 44 %
No Need For Else All, Analyze 1 1 Minor 74 %
No Parenthesis For Language Construct Analyze, ClearPHP, All, RadwellCodes, Simple, Suggestions, Level 2, CI-checks 43 18 Minor 61 %
Avoid Substr() One Analyze, Performances, All, CompatibilityPHP71, Simple, Level 2, Suggestions, Top10, CI-checks 3 2 Minor 57 %
Variable Is Not A Condition All, Analyze 92 18 Minor 57 %
include_once() Usage Analyze, Appinfo, All 47 19 Minor 73 %
Several Instructions On The Same Line Analyze, All 15 11 Major 57 %
Print And Die Analyze, All, Simple, CI-checks 2 1 Minor 29 %
Should Chain Exception Analyze, All, Simple, CI-checks 9 4 Minor 36 %
Should Make Ternary All, Analyze, OneFile, Simple, CI-checks 11 7 Minor 85 %
Preprocessable Analyze, All, Rector 71 10 Minor 86 %
Switch To Switch Analyze, All, RadwellCodes, Simple 1 1 Minor 79 %
Switch Without Default Analyze, ClearPHP, All, Simple, CI-checks 2 1 Major 68 %
Timestamp Difference Analyze, All, Simple, Level 3, CI-checks 1 1 Major 50 %
Unchecked Resources Analyze, ClearPHP, All, Simple, Level 2, CI-checks 5 3 Major 49 %
Unconditional Break In Loop All, Analyze, Level 3, CI-checks 3 3 Major 46 %
Unsupported Types With Operators All, Analyze, CompatibilityPHP80 2 2 Minor 0 %
Useless Global Analyze, OneFile, All, Simple, Level 2 4 3 Minor 24 %
Useless Instructions Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 1 1 Minor 58 %
Useless Parenthesis Analyze, All, Simple, CI-checks 20 7 Minor 81 %
Should Typecast Analyze, OneFile, All, Simple, CI-checks 1 1 Minor 47 %
Strings With Strange Space All, Analyze, CI-checks 1 1 Minor 15 %
Assigned Twice All, Analyze 8 2 Minor 78 %
Overwritten Literals Analyze, All 8 2 Major 78 %
Undefined Variable All, Analyze, CI-checks 113 15 Minor 77 %
Used Once Variables Analyze, OneFile, All, Simple, Top10 2 2 Minor 87 %
Used Once Variables (In Scope) Analyze, ClearPHP, OneFile, All, Simple, Level 4 22 7 Minor 95 %
Written Only Variables Analyze, OneFile, All, Simple 10 5 Minor 78 %