PHP Static analysis for moeSS

Label Recipes Issues Files Severity Frequence
Multiple Index Definition Analyze, OneFile, All, Simple 1 1 Minor 25 %
Null Or Boolean Arrays All, Analyze 21 2 Minor 0 %
Randomly Sorted Arrays All, Analyze, Level 4, Suggestions 5 4 Minor 41 %
String Initialization All, CompatibilityPHP71 205 38 Minor 33 %
Too Many Array Dimensions All, Analyze 8 1 Minor 0 %
Abstract Or Implements All, Analyze, LintButWontExec 3 3 Major 4 %
Ambiguous Visibilities All, Analyze 18 16 Minor 70 %
Avoid option arrays in constructors All, Analyze, ClassReview 3 3 Minor 0 %
Avoid Optional Properties All, Analyze 198 41 Major 83 %
Child Class Removes Typehint All, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP71, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, Typechecks 2 2 Major 1 %
Could Be Abstract Class All, Analyze, ClassReview 15 13 Minor 65 %
Class Could Be Final All, Analyze, ClassReview 130 127 Minor 95 %
Method Could Be Static All, Analyze, ClassReview 217 70 Minor 95 %
Don't Send $this In Constructor All, Analyze 1 1 Minor 39 %
Empty Classes Analyze, All, Simple 2 1 Minor 58 %
Hidden Nullable All, Analyze, ClassReview 2 1 Minor 0 %
Incompatible Signature Methods With Covariance All, Analyze 2 2 Critical 0 %
Locally Unused Property Dead code, All, Simple 183 63 Minor 76 %
Method Signature Must Be Compatible All, Analyze, LintButWontExec 23 16 Critical 50 %
Multiple Class Declarations Analyze, All, Simple 2 1 Major 5 %
No Public Access Analyze, All 263 43 Minor 60 %
Non Nullable Getters All, Analyze, ClassReview 53 26 Minor 0 %
Forgotten Visibility Analyze, ClearPHP, All, Simple, Level 1 133 6 Minor 42 %
Non Static Methods Called In A Static Analyze, CompatibilityPHP56, All, Simple, CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55 1 1 Minor 20 %
Never Used Properties Analyze, All, Simple 34 9 Minor 72 %
Property Used In One Method Only All, Analyze 134 41 Minor 84 %
Redefined Default Analyze, All, Simple 41 26 Major 26 %
Scalar Or Object Property All, Analyze 3 2 Minor 24 %
Should Use Local Class Analyze, ClearPHP, All, Simple 180 46 Minor 94 %
$this Belongs To Classes Or Traits Analyze, All, Simple 19 13 Major 23 %
Wrong Access Style to Property All, Analyze, Level 2, ClassReview 210 10 Critical 3 %
Undefined Properties Analyze, ClearPHP, All, Simple 57 8 Major 58 %
Unresolved Catch Dead code, ClearPHP, All 4 3 Major 51 %
Unused Classes Dead code, All, Simple, Analyze 6 6 Major 72 %
Unused Methods Dead code, All, Simple 873 115 Minor 95 %
Unused Protected Methods Dead code, All 229 68 Major 72 %
Use Class Operator All, Analyze, Performances, Simple 87 28 Minor 74 %
Use Instanceof Analyze, All, Simple 37 18 Major 63 %
Used Once Property All, Analyze 37 17 Minor 72 %
Weak Typing All, Analyze 1 1 Minor 41 %
Use const Analyze, Coding Conventions, All, Top10 34 6 Minor 57 %
Constants With Strange Names Analyze, All, Simple 29 5 Minor 1 %
Invalid Constant Name Analyze, All, Simple 29 5 Major 1 %
Multiple Constant Definition Analyze, All, Simple 14 5 Minor 32 %
Undefined Constants Analyze, All, Simple, CompatibilityPHP72 272 251 Minor 54 %
Unused Constants Dead code, All, Simple 25 2 Minor 36 %
Undefined Caught Exceptions Dead code, All 4 3 None 50 %
Uncaught Exceptions Analyze, All 3 2 Minor 81 %
Useless Catch All, Analyze 2 2 Minor 47 %
ext/mcrypt Appinfo, All, CompatibilityPHP71 41 4 Major 14 %
Missing Include All, Analyze 36 13 Critical 61 %
Aliases Usage Analyze, ClearPHP, OneFile, All, Simple, Level 1 22 4 Minor 42 %
Use Named Boolean In Argument Definition All, Analyze 184 77 Minor 84 %
Callback Needs Return All, Analyze 2 2 Major 51 %
Could Make A Function All, Analyze, Suggestions 1280 251 Minor 75 %
Deep Definitions Analyze, Appinfo, All, Simple 2 1 Major 12 %
Empty Function Analyze, All, Simple 4 3 Minor 71 %
Hardcoded Passwords Analyze, OneFile, Security, All, Simple, Level 3 18 8 Major 61 %
Mismatched Default Arguments All, Analyze, Typechecks 181 42 Minor 33 %
Mismatched Typehint All, Analyze, Typechecks 90 15 Major 5 %
Never Used Parameter All, Analyze, Suggestions 382 109 Minor 47 %
No Boolean As Default All, Analyze 184 77 Minor 84 %
No Literal For Reference All, Analyze 29 11 Minor 0 %
Only Variable For Reference All, Analyze, LintButWontExec 119 52 Critical 24 %
Only Variable Passed By Reference All, Analyze 119 52 Critical 40 %
Redeclared PHP Functions Analyze, Appinfo, All, Simple 7 3 Minor 28 %
Relay Function Analyze, All 66 25 Major 83 %
Too Many Local Variables All, Analyze 7 7 Minor 65 %
Undefined Functions Analyze, All 31 4 Major 71 %
Unused Arguments Analyze, All, Simple 35 24 Major 89 %
Unused Returned Value All, Analyze, OneFile, Dead code, Simple 11 7 Minor 39 %
Use Constant As Arguments Analyze, All, Simple 2 1 Major 25 %
Useless Referenced Argument All, Analyze 10 8 Minor 57 %
Useless Return Analyze, OneFile, All, Simple, Level 4 2 2 Minor 29 %
Uses Default Values Analyze, All, Simple 1496 143 Minor 97 %
Methods Without Return All, Analyze 180 83 Minor 0 %
Wrong Number Of Arguments Analyze, OneFile, All, Simple 7 5 Major 38 %
Wrong Optional Parameter Analyze, All, Simple, Level 1 5 3 Minor 38 %
Wrong Type With Call All, Analyze, Typechecks 7 5 Minor 0 %
Already Parents Interface Analyze, All, Level 3, Suggestions 4 4 Minor 17 %
Forgotten Interface All, Analyze 1 1 Minor 52 %
Interfaces Is Not Implemented All, Analyze, ClassReview 7 7 Minor 0 %
No array_merge() In Loops Analyze, Performances, ClearPHP, All, Simple, Level 2, Top10 3 2 Major 55 %
Logical To in_array All, Analyze, Level 2 20 12 Minor 66 %
Memoize MagicCall All, Analyze, ClassReview 57 5 Minor 0 %
Pre-increment Analyze, Performances, All, Simple, Level 4 192 86 Minor 74 %
strpos() Too Much All, Analyze 12 8 Minor 46 %
array_key_exists() Works On Arrays All, CompatibilityPHP74, Analyze 8 6 Minor 0 %
Use random_int() Analyze, Security, All, CompatibilityPHP71, Simple, Level 2 51 12 Major 59 %
Deprecated Functions Analyze, All 10 3 Major 22 %
idn_to_ascii() New Default All, CompatibilityPHP74 2 2 None 4 %
Wrong Parameter Type Analyze, OneFile, All, Simple 3 3 Major 45 %
Use === null Analyze, OneFile, All, RadwellCodes, Simple, php-cs-fixable 4 2 Minor 52 %
List With Keys CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, Appcontent, Appinfo, All 1 1 Major 32 %
Logical Should Use Symbolic Operators Analyze, OneFile, ClearPHP, All, Simple, Suggestions, Level 2, Top10, php-cs-fixable 616 250 Minor 42 %
Possible Missing Subpattern All, Analyze, Top10 14 9 Minor 40 %
No Class In Global All, Analyze 319 169 Minor 78 %
PHP 7.1 Removed Directives CompatibilityPHP71, All 1 1 Major 1 %
PHP 7.2 Deprecations All, CompatibilityPHP72 10 3 Major 1 %
PHP 7.2 Removed Functions All, CompatibilityPHP72 10 3 Major 1 %
PHP 8.0 Removed Functions All, CompatibilityPHP80 12 5 Major 0 %
PHP Keywords As Names Analyze, All, Simple 414 40 Major 89 %
Scalar Are Not Arrays All, Analyze, CompatibilityPHP74 43 5 Minor 0 %
set_exception_handler() Warning CompatibilityPHP70, All 1 1 Major 0 %
Should Use Coalesce Analyze, All, Simple, Suggestions, Level 3 62 36 Major 71 %
Unknown Pcre2 Option All, Analyze, CompatibilityPHP73 3 2 Minor 15 %
Use Nullable Type All, Appinfo, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 135 45 Major 21 %
Use PHP Object API Analyze, ClearPHP, All, Simple 9 4 Minor 23 %
Avoid Using stdClass All, Analyze, OneFile, Simple, Level 4 29 28 Minor 45 %
Always Anchor Regex All, Security 49 22 Major 65 %
Avoid Those Hash Functions Security, All 63 20 Major 60 %
Configure Extract All, Security 6 6 Minor 22 %
Direct Injection Security, All 19 9 Major 41 %
Don't Echo Error All, Analyze, Security, Simple, Level 1 2 1 Critical 32 %
Encoded Simple Letters All, Security 5 1 Minor 40 %
Indirect Injection Security, All 1 1 Critical 21 %
Keep Files Access Restricted All, Security 1 1 Minor 0 %
No Net For Xml Load All, Security 13 12 Major 49 %
Avoid sleep()/usleep() Security, All 2 2 Minor 39 %
Session Lazy Write All, Security 5 5 Major 4 %
Should Use Prepared Statement Analyze, Security, All, Simple 7 6 Major 22 %
Unserialize Second Arg Security, All 9 6 Critical 49 %
Altering Foreach Without Reference Analyze, ClearPHP, All, Simple, Level 1 10 8 Major 52 %
Alternative Syntax Consistence All, Analyze 12 1 Major 20 %
Bail Out Early All, Analyze, OneFile, Simple, Level 4 29 12 Minor 92 %
Strict Comparison With Booleans Analyze, All, Simple, Suggestions, Level 2 44 22 Minor 76 %
Buried Assignation Analyze, All 460 112 Minor 82 %
Cast To Boolean Analyze, OneFile, All, Simple, Level 1 4 3 Minor 55 %
Casting Ternary All, Analyze, OneFile 1 1 Major 0 %
Check All Types All, Analyze 59 30 Major 68 %
Check JSON All, Analyze 1 1 Major 64 %
Common Alternatives Analyze, All, Simple 45 31 Major 61 %
Concat Empty String All, Analyze, OneFile 3 1 Minor 0 %
Could Use __DIR__ Analyze, All, Simple, Suggestions, Level 3, php-cs-fixable 1 1 Major 56 %
Could Use Short Assignation Analyze, OneFile, Performances, All, Simple 7 4 Minor 60 %
Could Use str_repeat() All, Analyze, Level 1, Top10 9 7 Minor 12 %
Dont Change The Blind Var All, Analyze 96 45 Minor 72 %
Dont Mix ++ All, Analyze 16 13 Minor 43 %
Don't Read And Write In One Expression All, Analyze, CompatibilityPHP73, CompatibilityPHP74 12 6 Critical 38 %
Double Assignation Analyze, All 23 15 Major 55 %
Double Instructions Analyze, All, Simple 2 2 Minor 57 %
Drop Else After Return All, Analyze, OneFile, Simple, Suggestions, Level 4 141 54 Minor 70 %
Echo With Concat Performances, Analyze, All, Simple, Suggestions 54 12 Minor 58 %
Else If Versus Elseif Analyze, All, Simple, php-cs-fixable, Rector 3 3 Minor 65 %
Empty Blocks Analyze, All, Simple 1 1 Minor 57 %
Empty Instructions Dead code, Analyze, All, Simple 554 51 Minor 43 %
Eval() Usage Analyze, Appinfo, Performances, OneFile, ClearPHP, All, Simple, Security 1 1 Major 37 %
eval() Without Try Analyze, All, Simple, Level 3, Security 1 1 Critical 34 %
Exit() Usage Analyze, Appinfo, OneFile, ClearPHP, All 272 251 Major 60 %
Global Usage Analyze, Appinfo, ClearPHP, All 2 1 Minor 52 %
Htmlentities Calls Analyze, All, Simple 13 3 Major 39 %
Identical Consecutive Expression All, Analyze 39 5 Minor 58 %
If With Same Conditions Analyze, All, Simple 1 1 Major 44 %
Iffectations Analyze, All 175 69 Minor 80 %
Implied If Analyze, ClearPHP, All, Simple 415 250 Major 29 %
Implode() Arguments Order All, Analyze 13 10 Minor 0 %
Inconsistent Elseif All, Analyze 56 33 Major 73 %
Infinite Recursion All, Analyze 2 2 Major 0 %
list() May Omit Variables Analyze, All, Simple, Suggestions, Level 3 1 1 Minor 37 %
Long Arguments All, Analyze 11 9 Minor 67 %
Max Level Of Nesting All, Analyze 19 17 Minor 0 %
Merge If Then All, Analyze 57 35 Minor 0 %
Mismatched Ternary Alternatives All, Analyze, Suggestions, Level 4 35 17 Major 62 %
Missing Cases In Switch All, Analyze 2 1 Minor 2 %
Missing New ? All, Analyze 3 3 Critical 5 %
Mixed Concat And Interpolation All, Coding Conventions, Analyze 3 1 Minor 43 %
Modernize Empty With Expression All, Analyze, OneFile, Simple 26 18 Minor 56 %
Multiple Type Variable All, Analyze, Level 4 19 16 Minor 43 %
Multiply By One Analyze, OneFile, ClearPHP, All, Simple, Level 1 1 1 Minor 17 %
Nested Ifthen Analyze, All, RadwellCodes 89 43 Major 87 %
Nested Ternary Analyze, ClearPHP, All, Simple, Level 1 4 2 Major 20 %
Don't Change Incomings Analyze, All 17 5 Minor 44 %
No Direct Usage Analyze, All, Simple 1 1 Major 36 %
No Hardcoded Hash Analyze, Security, All, Simple 3 2 Critical 44 %
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 179 57 Minor 74 %
No Parenthesis For Language Construct Analyze, ClearPHP, All, RadwellCodes, Simple, Suggestions, Level 2 102 30 Minor 61 %
Variable Is Not A Condition All, Analyze 183 61 Minor 57 %
@ Operator Appinfo, ClearPHP, All, Analyze, Performances 92 30 Minor 66 %
include_once() Usage Analyze, Appinfo, All 50 10 Minor 73 %
Several Instructions On The Same Line Analyze, All 191 86 Major 57 %
Printf Number Of Arguments All, Analyze 1 1 Minor 42 %
Random Without Try Security, All 4 3 Critical 21 %
Repeated Regex All, Analyze, Level 1 18 8 Minor 47 %
Return True False Analyze, All, Simple, Level 1 4 4 Major 53 %
Same Conditions In Condition Analyze, All, Simple 3 3 Critical 49 %
Should Make Ternary All, Analyze, OneFile, Simple 69 43 Minor 85 %
Preprocessable Analyze, All, Rector 1667 251 Minor 86 %
Static Loop Analyze, All, Simple, Level 4 5 4 Minor 65 %
Strpos()-like Comparison Analyze, PHP recommendations, ClearPHP, All, Simple, Level 2, Top10 12 8 Major 54 %
Suspicious Comparison All, Analyze, Level 3 1 1 Major 15 %
Switch To Switch Analyze, All, RadwellCodes, Simple 12 9 Minor 79 %
Switch Without Default Analyze, ClearPHP, All, Simple 9 6 Major 68 %
Test Then Cast All, Analyze 2 1 Major 32 %
Timestamp Difference Analyze, All, Simple, Level 3 6 6 Major 50 %
Unchecked Resources Analyze, ClearPHP, All, Simple, Level 2 2 2 Major 49 %
Unconditional Break In Loop All, Analyze, Level 3 5 4 Major 46 %
Unreachable Code Dead code, OneFile, ClearPHP, All, Simple, Suggestions, Level 3 14 7 Major 44 %
Use Constant PHP recommendations, All, Analyze, php-cs-fixable 1 1 Minor 0 %
Avoid get_class() Analyze, All, Simple 3 1 Minor 32 %
Use Positive Condition All, Analyze, OneFile, Simple 57 38 Minor 81 %
Useless Casting All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4 2 1 Minor 37 %
Useless Check All, Analyze, OneFile, Simple, Level 1 19 11 Minor 48 %
Useless Instructions Analyze, OneFile, ClearPHP, All, Simple, Level 1 9 9 None 58 %
Useless Parenthesis Analyze, All, Simple 243 78 Minor 81 %
Useless Unset Analyze, OneFile, ClearPHP, All, Simple, Level 2 1 1 Major 28 %
var_dump()... Usage Analyze, ClearPHP, Security, All 1 1 Critical 40 %
While(List() = Each()) Analyze, Performances, OneFile, All, Simple, Suggestions, Level 2 7 2 Minor 15 %
preg_replace With Option e Analyze, CompatibilityPHP70, Security, CompatibilityPHP71, All, Simple, CompatibilityPHP72 1 1 Major 8 %
Should Typecast Analyze, OneFile, All, Simple 3 2 Minor 47 %
String May Hold A Variable Analyze, All, Simple 22 7 Minor 58 %
Assigned Twice All, Analyze 133 30 Minor 78 %
Overwritten Literals Analyze, All 150 30 Major 78 %
Php 7 Indirect Expression CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, CompatibilityPHP70, All 2 1 Major 14 %
Strange Name For Variables All, Analyze 14 1 Minor 28 %
Undefined Constant Name All, Analyze 2 1 Minor 0 %
Undefined Variable All, Analyze 758 82 Minor 77 %
Used Once Variables Analyze, OneFile, All, Simple, Top10 47 14 Minor 87 %
Used Once Variables (In Scope) Analyze, ClearPHP, OneFile, All, Simple, Level 4 233 98 Minor 95 %
Written Only Variables Analyze, OneFile, All, Simple 21 16 Minor 78 %