PHP Static analysis for mainwp

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 66 10 Minor 0 %
Randomly Sorted Arrays All, Analyze, Level 4, Suggestions 7 4 Minor 41 %
String Initialization All, CompatibilityPHP71 30 11 Minor 33 %
Too Many Array Dimensions All, Analyze 12 2 Minor 0 %
Ambiguous Static All, Analyze 60 41 Minor 64 %
Ambiguous Visibilities All, Analyze 33 28 Minor 70 %
Avoid Optional Properties All, Analyze 14 5 Major 83 %
Cant Instantiate Class All, Analyze 1 1 Critical 28 %
Could Be Abstract Class All, Analyze, ClassReview 1 1 Minor 65 %
Class Could Be Final All, Analyze, ClassReview 100 98 Minor 95 %
Method Could Be Static All, Analyze, ClassReview 174 28 Minor 95 %
Locally Unused Property Dead code, All, Simple 8 6 Minor 76 %
Assign Default To Properties Analyze, ClearPHP, All, Simple, Level 2 3 3 Minor 49 %
Make Global A Property Analyze, All, Simple 142 41 Minor 33 %
Mismatch Properties Typehints All, Analyze, LintButWontExec, ClassReview 3 2 Minor 0 %
No Public Access Analyze, All 43 21 Minor 60 %
Non Nullable Getters All, Analyze, ClassReview 11 8 Minor 0 %
Forgotten Visibility Analyze, ClearPHP, All, Simple, Level 1, CI-checks 1 1 Minor 42 %
Property Could Be Local All, Analyze, ClassReview 34 27 Minor 71 %
Never Used Properties Analyze, All, Simple 7 5 Minor 72 %
Property Used In One Method Only All, Analyze 49 35 Minor 84 %
Redefined Default Analyze, All, Simple, CI-checks 1 1 Major 26 %
Redefined Private Property All, Analyze 5 5 Major 18 %
Scalar Or Object Property All, Analyze 1 1 Minor 24 %
Should Use Local Class Analyze, ClearPHP, All, Simple 741 90 Minor 94 %
Static Methods Called From Object Analyze, All, Simple, CI-checks 13 10 Minor 38 %
Undefined Classes Analyze, All 72 6 Major 91 %
Undefined Properties Analyze, ClearPHP, All, Simple, CI-checks 10 2 Major 58 %
Undefined static:: Or self:: Analyze, All, Simple 2 2 Minor 33 %
Unresolved Classes Analyze, All 9 4 Major 86 %
Unresolved Instanceof Analyze, Dead code, ClearPHP, All, Simple, Top10 1 1 Major 48 %
Unused Classes Dead code, All, Simple, Analyze 1 1 Major 72 %
Unused Methods Dead code, All, Simple 252 74 Minor 95 %
Unused Private Methods Dead code, OneFile, All, Simple 1 1 Minor 45 %
Unused Private Properties Dead code, OneFile, All, Simple 2 2 Minor 37 %
Use Class Operator All, Analyze, Performances, Simple, CI-checks 3 1 Minor 74 %
Use Instanceof Analyze, All, Simple, CI-checks 22 12 Major 63 %
Used Once Property All, Analyze 8 6 Minor 72 %
Useless Constructor Analyze, All, Simple, Level 3 5 5 Minor 38 %
Weak Typing All, Analyze 22 10 Minor 41 %
Use const Analyze, Coding Conventions, All, Top10, CI-checks 5 5 Minor 57 %
Constants With Strange Names Analyze, All, Simple, CI-checks 5 3 Minor 1 %
Invalid Constant Name Analyze, All, Simple 2 2 Major 1 %
Multiple Constant Definition Analyze, All, Simple, CI-checks 2 2 Minor 32 %
Undefined Constants Analyze, All, Simple, CompatibilityPHP72, CI-checks 138 42 Minor 54 %
Unused Constants Dead code, All, Simple 1 1 Minor 36 %
Catch Undefined Variable All, Analyze 6 1 Minor 0 %
Forgotten Thrown All, Analyze 9 7 Major 30 %
Uncaught Exceptions Analyze, All 18 7 Minor 81 %
Useless Catch All, Analyze, CI-checks 1 1 Minor 47 %
Missing Include All, Analyze 31 16 Critical 61 %
Aliases Usage Analyze, ClearPHP, OneFile, All, Simple, Level 1, CI-checks 10 7 Minor 42 %
Use Named Boolean In Argument Definition All, Analyze 95 36 Minor 84 %
Could Make A Function All, Analyze, Suggestions 4034 95 Minor 75 %
Deep Definitions Analyze, Appinfo, All, Simple 2 2 Major 12 %
Empty Function Analyze, All, Simple 10 7 Minor 71 %
Hardcoded Passwords Analyze, OneFile, Security, All, Simple, Level 3 19 8 Major 61 %
Mismatched Default Arguments All, Analyze, Typechecks 92 30 Minor 33 %
Mismatched Typehint All, Analyze, Typechecks 60 21 Major 5 %
Never Used Parameter All, Analyze, Suggestions 56 28 Minor 47 %
No Boolean As Default All, Analyze 95 36 Minor 84 %
No Return Used All, Analyze, Suggestions, Level 4 22 9 Minor 41 %
Only Variable Passed By Reference All, Analyze 2 2 Critical 40 %
Relay Function Analyze, All 39 16 Major 83 %
Should Use Constants Analyze, All, Simple 9 2 Minor 24 %
Too Many Local Variables All, Analyze 59 31 Minor 65 %
Typehinted References All, Analyze, CI-checks 1 1 Minor 12 %
Undefined Functions Analyze, All, CI-checks 7259 106 Major 71 %
Unused Arguments Analyze, All, Simple 53 38 Major 89 %
Unused Returned Value All, Analyze, OneFile, Dead code, Simple 35 16 Minor 39 %
Useless Referenced Argument All, Analyze 11 7 Minor 57 %
Uses Default Values Analyze, All, Simple, CI-checks 1739 95 Minor 97 %
Methods Without Return All, Analyze 704 83 Minor 0 %
Wrong Number Of Arguments Analyze, OneFile, All, Simple, CI-checks 56 26 Major 38 %
Wrong Optional Parameter Analyze, All, Simple, Level 1, CI-checks 7 6 Minor 38 %
Wrong Type With Call All, Analyze, Typechecks, CI-checks 2 1 Minor 0 %
Undefined Interfaces Analyze, All, CI-checks 1 1 Major 67 %
No array_merge() In Loops Analyze, Performances, ClearPHP, All, Simple, Level 2, Top10, CI-checks 16 11 Major 55 %
Logical To in_array All, Analyze, Level 2 83 25 Minor 66 %
Pre-increment Analyze, Performances, All, Simple, Level 4, CI-checks 100 35 Minor 74 %
strpos() Too Much All, Analyze, CI-checks 1 1 Minor 46 %
Detect Current Class All, Suggestions, CompatibilityPHP74 58 55 None 47 %
Don't Pollute Global Space All, Analyze 15 7 Minor 0 %
Wrong Parameter Type Analyze, OneFile, All, Simple, CI-checks 54 25 Major 45 %
Use === null Analyze, OneFile, All, RadwellCodes, Simple, php-cs-fixable, CI-checks 4 4 Minor 52 %
No Class In Global All, Analyze, CI-checks 7 3 Minor 78 %
No Substr Minus One All, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 4 2 Major 12 %
PHP Keywords As Names Analyze, All, Simple 212 34 Major 89 %
Scalar Are Not Arrays All, Analyze, CompatibilityPHP74, CI-checks 10 1 Minor 0 %
Should Use Coalesce Analyze, All, Simple, Suggestions, Level 3, CI-checks 106 34 Major 71 %
Use Nullable Type All, Appinfo, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 76 27 Major 21 %
Use PHP Object API Analyze, ClearPHP, All, Simple, CI-checks 6 2 Minor 23 %
Avoid Using stdClass All, Analyze, OneFile, Simple, Level 4 27 15 Minor 45 %
Usort Sorting In PHP 7.0 CompatibilityPHP70, All 4 4 Major 46 %
Wrong Type For Native PHP Function All, Analyze, CI-checks 561 70 Minor 0 %
Always Anchor Regex All, Security 22 14 Major 65 %
Avoid Those Hash Functions Security, All 16 7 Major 60 %
Compare Hash Security, ClearPHP, All 2 2 Major 14 %
Configure Extract All, Security 1 1 Minor 22 %
Safe Curl Options Security, All 8 1 Major 14 %
Direct Injection Security, All 11 7 Major 41 %
Indirect Injection Security, All 17 3 Critical 21 %
Integer Conversion All, Security 10 5 Major 0 %
Keep Files Access Restricted All, Security 3 3 Minor 0 %
Avoid sleep()/usleep() Security, All 20 4 Minor 39 %
Should Use Prepared Statement Analyze, Security, All, Simple, CI-checks 68 27 Major 22 %
Should Use session_regenerateid() All, Security 1 1 Major 82 %
Adding Zero Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 5 3 Minor 33 %
Altering Foreach Without Reference Analyze, ClearPHP, All, Simple, Level 1, CI-checks 4 3 Major 52 %
Alternative Syntax Consistence All, Analyze 30 1 Major 20 %
Array_merge Needs Array Of Arrays All, Analyze 16 10 Minor 0 %
Bail Out Early All, Analyze, OneFile, Simple, Level 4 16 14 Minor 92 %
Strict Comparison With Booleans Analyze, All, Simple, Suggestions, Level 2, CI-checks 115 42 Minor 76 %
Buried Assignation Analyze, All 97 35 Minor 82 %
Cast To Boolean Analyze, OneFile, All, Simple, Level 1 201 44 Minor 55 %
Check All Types All, Analyze 34 21 Major 68 %
Check JSON All, Analyze, CI-checks 238 36 Major 64 %
Common Alternatives Analyze, All, Simple 422 37 Major 61 %
Concat Empty String All, Analyze, OneFile 2 2 Minor 0 %
Could Be Else All, Analyze 10 8 Minor 48 %
Could Be Static Analyze, OneFile, All, ClassReview 5 3 Major 20 %
Could Use __DIR__ Analyze, All, Simple, Suggestions, Level 3, php-cs-fixable, CI-checks 1 1 Major 56 %
Could Use Short Assignation Analyze, OneFile, Performances, All, Simple, CI-checks 11 7 Minor 60 %
__DIR__ Then Slash All, Analyze, Level 3, CI-checks 6 5 Major 13 %
Dont Change The Blind Var All, Analyze 33 17 Minor 72 %
Dont Mix ++ All, Analyze 4 3 Minor 43 %
Double Assignation Analyze, All 10 7 Major 55 %
Double Instructions Analyze, All, Simple 8 6 Minor 57 %
Drop Else After Return All, Analyze, OneFile, Simple, Suggestions, Level 4, CI-checks 31 24 Minor 70 %
Echo With Concat Performances, Analyze, All, Simple, Suggestions 127 35 Minor 58 %
Else If Versus Elseif Analyze, All, Simple, php-cs-fixable, Rector, CI-checks 34 18 Minor 65 %
Empty Instructions Dead code, Analyze, All, Simple 5917 53 Minor 43 %
Empty Try Catch Analyze, All, Level 3 8 3 Minor 47 %
Eval() Usage Analyze, Appinfo, Performances, OneFile, ClearPHP, All, Simple, Security 1 1 Major 37 %
eval() Without Try Analyze, All, Simple, Level 3, Security, CI-checks 1 1 Critical 34 %
Exit() Usage Analyze, Appinfo, OneFile, ClearPHP, All, CI-checks 306 37 Major 60 %
Switch Fallthrough All, Inventory, Security, Stats 1 1 Minor 37 %
Global Usage Analyze, Appinfo, ClearPHP, All 154 44 Minor 52 %
Htmlentities Calls Analyze, All, Simple, CI-checks 6 5 Major 39 %
Identical Consecutive Expression All, Analyze 2 1 Minor 58 %
If With Same Conditions Analyze, All, Simple, CI-checks 7 7 Major 44 %
Implied If Analyze, ClearPHP, All, Simple, CI-checks 4 4 Major 29 %
Implode() Arguments Order All, Analyze, CI-checks 11 9 Minor 0 %
Inconsistent Elseif All, Analyze 48 35 Major 73 %
Indices Are Int Or String Analyze, OneFile, All, Simple, CI-checks 3 1 Major 18 %
list() May Omit Variables Analyze, All, Simple, Suggestions, Level 3, CI-checks 4 3 Minor 37 %
Logical Mistakes Analyze, All, Simple, Level 1, CI-checks 1 1 Critical 31 %
Long Arguments All, Analyze 138 27 Minor 67 %
Max Level Of Nesting All, Analyze 100 49 Minor 0 %
Merge If Then All, Analyze, CI-checks 180 56 Minor 0 %
Mismatched Ternary Alternatives All, Analyze, Suggestions, Level 4 3 3 Major 62 %
Mixed Concat And Interpolation All, Coding Conventions, Analyze 3 2 Minor 43 %
Modernize Empty With Expression All, Analyze, OneFile, Simple 97 37 Minor 56 %
Multiple Type Variable All, Analyze, Level 4 32 18 Minor 43 %
Multiply By One Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 6 5 Minor 17 %
Nested Ifthen Analyze, All, RadwellCodes 354 69 Major 87 %
Nested Ternary Analyze, ClearPHP, All, Simple, Level 1, CI-checks 7 6 Major 20 %
Don't Change Incomings Analyze, All 1 1 Minor 44 %
No Choice Analyze, All, Simple, Level 2, Top10, CI-checks 3 3 Major 43 %
No Hardcoded Hash Analyze, Security, All, Simple 13 11 Critical 44 %
No Hardcoded Ip Analyze, ClearPHP, Security, All, Simple 47 22 Minor 24 %
No isset() With empty() All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4, CI-checks 62 27 Minor 28 %
No Need For Else All, Analyze 50 28 Minor 74 %
No Parenthesis For Language Construct Analyze, ClearPHP, All, RadwellCodes, Simple, Suggestions, Level 2, CI-checks 189 28 Minor 61 %
Avoid Substr() One Analyze, Performances, All, CompatibilityPHP71, Simple, Level 2, Suggestions, Top10, CI-checks 20 13 Minor 57 %
Variable Is Not A Condition All, Analyze 612 84 Minor 57 %
@ Operator Appinfo, ClearPHP, All, Analyze, Performances, CI-checks 41 4 Minor 66 %
Objects Don't Need References Analyze, ClearPHP, OneFile, All, Simple, Level 2, Top10, CI-checks 21 16 Minor 31 %
include_once() Usage Analyze, Appinfo, All 37 22 Minor 73 %
Several Instructions On The Same Line Analyze, All 774 47 Major 57 %
PHP7 Dirname CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, All, Suggestions, php-cs-fixable 5 2 Minor 42 %
Print And Die Analyze, All, Simple, CI-checks 21 2 Minor 29 %
Printf Number Of Arguments All, Analyze, CI-checks 10 1 Minor 42 %
Repeated print() Analyze, All, Simple, Suggestions, Level 3, Top10, CI-checks 20 10 Major 49 %
Repeated Regex All, Analyze, Level 1, CI-checks 14 10 Minor 47 %
Return True False Analyze, All, Simple, Level 1, CI-checks 67 29 Major 53 %
Same Conditions In Condition Analyze, All, Simple, CI-checks 13 12 Critical 49 %
Should Chain Exception Analyze, All, Simple, CI-checks 1 1 Minor 36 %
Should Make Ternary All, Analyze, OneFile, Simple, CI-checks 116 43 Minor 85 %
Preprocessable Analyze, All, Rector 237 51 Minor 86 %
Static Loop Analyze, All, Simple, Level 4 4 4 Minor 65 %
Strpos()-like Comparison Analyze, PHP recommendations, ClearPHP, All, Simple, Level 2, Top10, CI-checks 1 1 Major 54 %
Switch To Switch Analyze, All, RadwellCodes, Simple 20 14 Minor 79 %
Switch Without Default Analyze, ClearPHP, All, Simple, CI-checks 6 5 Major 68 %
Timestamp Difference Analyze, All, Simple, Level 3, CI-checks 26 17 Major 50 %
Unchecked Resources Analyze, ClearPHP, All, Simple, Level 2, CI-checks 5 4 Major 49 %
Unreachable Code Dead code, OneFile, ClearPHP, All, Simple, Suggestions, Level 3 11 6 Major 44 %
Unused Global Analyze, All, Simple 5 5 Minor 18 %
Use Constant PHP recommendations, All, Analyze, php-cs-fixable, CI-checks 1 1 Minor 0 %
Use Positive Condition All, Analyze, OneFile, Simple 66 33 Minor 81 %
Useless Casting All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4, CI-checks 2 2 Minor 37 %
Useless Check All, Analyze, OneFile, Simple, Level 1, CI-checks 11 8 Minor 48 %
Useless Global Analyze, OneFile, All, Simple, Level 2 6 3 Minor 24 %
Useless Instructions Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 10 7 None 58 %
Useless Parenthesis Analyze, All, Simple, CI-checks 183 42 Minor 81 %
Useless Switch Analyze, All, Simple 1 1 Major 30 %
Should Typecast Analyze, OneFile, All, Simple, CI-checks 275 53 Minor 47 %
Assigned Twice All, Analyze 490 50 Minor 78 %
Overwritten Literals Analyze, All 546 50 Major 78 %
Undefined Variable All, Analyze, CI-checks 76 21 Minor 77 %
Used Once Variables Analyze, OneFile, All, Simple, Top10 20 14 Minor 87 %
Used Once Variables (In Scope) Analyze, ClearPHP, OneFile, All, Simple, Level 4 162 65 Minor 95 %
Written Only Variables Analyze, OneFile, All, Simple 250 49 Minor 78 %