PHP Static analysis for oscommerce

Label Recipes Issues Files Severity Frequence
Multiple Index Definition Analyze, OneFile, All, Simple, CI-checks 1 1 Minor 25 %
Non-constant Index In Array Analyze, All, Simple 11 2 Minor 26 %
Null Or Boolean Arrays All, Analyze 26 3 Minor 0 %
String Initialization All, CompatibilityPHP71 27 6 Minor 33 %
Too Many Array Dimensions All, Analyze 38 10 Minor 0 %
Ambiguous Static All, Analyze 822 680 Minor 64 %
Ambiguous Visibilities All, Analyze 265 86 Minor 70 %
Avoid Optional Properties All, Analyze 73 30 Major 83 %
Child Class Removes Typehint All, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP71, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, Typechecks 6 4 Major 1 %
Constant Class Analyze, All, Simple, CI-checks 1 1 Minor 49 %
Could Be Abstract Class All, Analyze, ClassReview 8 8 Minor 65 %
Class Could Be Final All, Analyze, ClassReview 738 738 Minor 95 %
Method Could Be Static All, Analyze, ClassReview 80 54 Minor 95 %
Different Argument Counts All, Analyze, ClassReview 3 2 Minor 0 %
Don't Send $this In Constructor All, Analyze 1 1 Minor 39 %
Don't Unset Properties All, Analyze, Top10, php-cs-fixable, CI-checks 1 1 Major 40 %
Empty Classes Analyze, All, Simple 17 17 Minor 58 %
Class Should Be Final By Ocramius All, Analyze 20 20 Minor 42 %
Incompatible Signature Methods With Covariance All, Analyze 49 33 Critical 0 %
Locally Unused Property Dead code, All, Simple 195 75 Minor 76 %
Assign Default To Properties Analyze, ClearPHP, All, Simple, Level 2 22 16 Minor 49 %
Make Global A Property Analyze, All, Simple 96 38 Minor 33 %
Method Signature Must Be Compatible All, Analyze, LintButWontExec 3 2 Critical 50 %
Mismatch Properties Typehints All, Analyze, LintButWontExec, ClassReview 48 18 Minor 0 %
Multiple Class Declarations Analyze, All, Simple, CI-checks 2 2 Major 5 %
No Public Access Analyze, All 2 1 Minor 60 %
Non Nullable Getters All, Analyze, ClassReview 138 48 Minor 0 %
Forgotten Visibility Analyze, ClearPHP, All, Simple, Level 1, CI-checks 269 83 Minor 42 %
Non Static Methods Called In A Static Analyze, CompatibilityPHP56, All, Simple, CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CI-checks 3 3 Minor 20 %
Var Keyword Analyze, OneFile, ClearPHP, All, Simple, Level 1 57 48 Minor 22 %
Parent First All, Analyze, Suggestions 10 10 Minor 55 %
Property Could Be Local All, Analyze, ClassReview 1 1 Minor 71 %
Never Used Properties Analyze, All, Simple 21 13 Minor 72 %
Property Used In One Method Only All, Analyze 52 29 Minor 84 %
Redefined Default Analyze, All, Simple, CI-checks 36 14 Major 26 %
Scalar Or Object Property All, Analyze 1 1 Minor 24 %
Could Use self Analyze, All, Simple, Suggestions, Level 3, ClassReview 10 3 Minor 57 %
Should Use Local Class Analyze, ClearPHP, All, Simple 749 572 Minor 94 %
Static Methods Can't Contain $this Analyze, ClearPHP, All, Simple, Level 1, CI-checks 1 1 Major 5 %
Static Methods Called From Object Analyze, All, Simple, CI-checks 68 30 Minor 38 %
$this Is Not For Static Methods Analyze, All 1 1 Major 5 %
Wrong Access Style to Property All, Analyze, Level 2, ClassReview, CI-checks 35 14 Critical 3 %
Undefined Classes Analyze, All 253 102 Major 91 %
Undefined Class Constants Analyze, All, CI-checks 21 4 Major 53 %
Undefined Parent Analyze, All, Simple 1 1 Minor 63 %
Undefined Properties Analyze, ClearPHP, All, Simple, CI-checks 35 6 Major 58 %
Unresolved Classes Analyze, All 96 69 Major 86 %
Unresolved Instanceof Analyze, Dead code, ClearPHP, All, Simple, Top10 7 4 Major 48 %
Unused Classes Dead code, All, Simple, Analyze 446 446 Major 72 %
Unused Class Constant All, Analyze, ClassReview 3 2 Minor 0 %
Unused Methods Dead code, All, Simple 1075 669 Minor 95 %
Unused Private Methods Dead code, OneFile, All, Simple 2 2 Minor 45 %
Unused Protected Methods Dead code, All 4 3 Major 72 %
Use Class Operator All, Analyze, Performances, Simple, CI-checks 2 2 Minor 74 %
Used Once Property All, Analyze 104 70 Minor 72 %
Useless Abstract Class Analyze, All, Simple 1 1 Minor 60 %
Use const Analyze, Coding Conventions, All, Top10, CI-checks 4 4 Minor 57 %
Constants With Strange Names Analyze, All, Simple, CI-checks 2 2 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 1646 325 Minor 54 %
Uncaught Exceptions Analyze, All 2 2 Minor 81 %
Missing Include All, Analyze 53 29 Critical 61 %
Aliases Usage Analyze, ClearPHP, OneFile, All, Simple, Level 1, CI-checks 75 43 Minor 42 %
Use Named Boolean In Argument Definition All, Analyze 41 27 Minor 84 %
Could Make A Function All, Analyze, Suggestions 846 233 Minor 75 %
Empty Function Analyze, All, Simple 10 9 Minor 71 %
Hardcoded Passwords Analyze, OneFile, Security, All, Simple, Level 3 5 4 Major 61 %
Insufficient Typehint All, Analyze, Typechecks 4 4 Major 24 %
Mismatched Default Arguments All, Analyze, Typechecks 69 53 Minor 33 %
Mismatched Typehint All, Analyze, Typechecks 87 52 Major 5 %
Never Used Parameter All, Analyze, Suggestions 103 84 Minor 47 %
No Boolean As Default All, Analyze 41 27 Minor 84 %
No Return Used All, Analyze, Suggestions, Level 4 10 9 Minor 41 %
Only Variable Passed By Reference All, Analyze 27 13 Critical 40 %
Relay Function Analyze, All 9 6 Major 83 %
Too Many Local Variables All, Analyze 10 9 Minor 65 %
Undefined Functions Analyze, All, CI-checks 1597 169 Major 71 %
Unused Arguments Analyze, All, Simple 101 96 Major 89 %
Unused Functions Dead code, All, Simple 6 6 Minor 53 %
Useless Return Analyze, OneFile, All, Simple, Level 4 2 2 Minor 29 %
Uses Default Values Analyze, All, Simple, CI-checks 1189 331 Minor 97 %
Methods Without Return All, Analyze 585 356 Minor 0 %
Wrong Number Of Arguments Analyze, OneFile, All, Simple, CI-checks 48 36 Major 38 %
Wrong Optional Parameter Analyze, All, Simple, Level 1, CI-checks 29 22 Minor 38 %
Undefined Interfaces Analyze, All, CI-checks 7 4 Major 67 %
Useless Interfaces Analyze, ClearPHP, All, Simple, ClassReview, Typechecks 3 3 Minor 57 %
Hidden Use Expression Analyze, OneFile, All, Simple, CI-checks 2 1 Minor 24 %
Multiple Alias Definitions Analyze, All, Simple, CI-checks 12 12 Minor 42 %
Unused Use Dead code, ClearPHP, All, Simple 22 17 Major 54 %
Use With Fully Qualified Name Analyze, Coding Conventions, PHP recommendations, All, Simple 7 5 Minor 16 %
No array_merge() In Loops Analyze, Performances, ClearPHP, All, Simple, Level 2, Top10, CI-checks 2 2 Major 55 %
Logical To in_array All, Analyze, Level 2 19 14 Minor 66 %
Pre-increment Analyze, Performances, All, Simple, Level 4, CI-checks 88 56 Minor 74 %
array_key_exists() Works On Arrays All, CompatibilityPHP74, Analyze 3 3 Minor 0 %
Use random_int() Analyze, Security, All, CompatibilityPHP71, Simple, Level 2, CI-checks 12 8 Major 59 %
Deprecated Functions Analyze, All, CI-checks 1 1 Major 22 %
Detect Current Class All, Suggestions, CompatibilityPHP74 4 4 None 47 %
Don't Pollute Global Space All, Analyze 79 77 Minor 0 %
Incompilable Files Analyze, Appinfo, ClearPHP, All, Simple 3 3 Critical 0 %
Wrong Parameter Type Analyze, OneFile, All, Simple, CI-checks 24 6 Major 45 %
Use === null Analyze, OneFile, All, RadwellCodes, Simple, php-cs-fixable, CI-checks 17 8 Minor 52 %
No Class In Global All, Analyze, CI-checks 73 73 Minor 78 %
PHP 7.2 Deprecations All, CompatibilityPHP72 1 1 Major 1 %
PHP 7.2 Removed Functions All, CompatibilityPHP72 1 1 Major 1 %
PHP 8.0 Removed Functions All, CompatibilityPHP80 1 1 Major 0 %
PHP Keywords As Names Analyze, All, Simple 285 64 Major 89 %
Scalar Are Not Arrays All, Analyze, CompatibilityPHP74, CI-checks 26 2 Minor 0 %
Should Use Coalesce Analyze, All, Simple, Suggestions, Level 3, CI-checks 70 37 Major 71 %
Too Many Native Calls All, Analyze 17 17 Minor 47 %
Use Nullable Type All, Appinfo, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 192 96 Major 21 %
Usort Sorting In PHP 7.0 CompatibilityPHP70, All 7 7 Major 46 %
Wrong Type For Native PHP Function All, Analyze, CI-checks 558 155 Minor 0 %
Always Anchor Regex All, Security 5 3 Major 65 %
Avoid Those Hash Functions Security, All 4 2 Major 60 %
Compare Hash Security, ClearPHP, All 1 1 Major 14 %
Safe Curl Options Security, All 1 1 Major 14 %
Direct Injection Security, All 645 258 Major 41 %
Encoded Simple Letters All, Security 1 1 Minor 40 %
filter_input() As A Source All, Security 4 4 Minor 6 %
Integer Conversion All, Security 11 9 Major 0 %
Keep Files Access Restricted All, Security 1 1 Minor 0 %
No Net For Xml Load All, Security 21 15 Major 49 %
Should Use Prepared Statement Analyze, Security, All, Simple, CI-checks 14 14 Major 22 %
Unserialize Second Arg Security, All 7 3 Critical 49 %
Adding Zero Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 27 11 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 14 11 Minor 0 %
Bail Out Early All, Analyze, OneFile, Simple, Level 4 11 11 Minor 92 %
Strict Comparison With Booleans Analyze, All, Simple, Suggestions, Level 2, CI-checks 70 47 Minor 76 %
Buried Assignation Analyze, All 37 28 Minor 82 %
Cast To Boolean Analyze, OneFile, All, Simple, Level 1 56 41 Minor 55 %
Check All Types All, Analyze 10 9 Major 68 %
Check JSON All, Analyze, CI-checks 56 42 Major 64 %
Common Alternatives Analyze, All, Simple 155 35 Major 61 %
Could Be Else All, Analyze 32 13 Minor 48 %
Could Be Static Analyze, OneFile, All, ClassReview 2 2 Major 20 %
Could Use __DIR__ Analyze, All, Simple, Suggestions, Level 3, php-cs-fixable, CI-checks 3 2 Major 56 %
Could Use Short Assignation Analyze, OneFile, Performances, All, Simple, CI-checks 6 3 Minor 60 %
Could Use str_repeat() All, Analyze, Level 1, Top10, CI-checks 3 2 Minor 12 %
Dangling Array References PHP recommendations, Analyze, ClearPHP, All, Simple, Level 1, Top10, CI-checks 5 5 Major 40 %
Dont Change The Blind Var All, Analyze 7 7 Minor 72 %
Double Assignation Analyze, All 3 3 Major 55 %
Double Instructions Analyze, All, Simple 8 7 Minor 57 %
Drop Else After Return All, Analyze, OneFile, Simple, Suggestions, Level 4, CI-checks 13 12 Minor 70 %
Echo With Concat Performances, Analyze, All, Simple, Suggestions 1121 263 Minor 58 %
Else If Versus Elseif Analyze, All, Simple, php-cs-fixable, Rector, CI-checks 31 18 Minor 65 %
Empty Blocks Analyze, All, Simple, CI-checks 5 4 Minor 57 %
Empty Instructions Dead code, Analyze, All, Simple 3856 293 Minor 43 %
Exit() Usage Analyze, Appinfo, OneFile, ClearPHP, All, CI-checks 16 9 Major 60 %
Global Usage Analyze, Appinfo, ClearPHP, All 211 65 Minor 52 %
Htmlentities Calls Analyze, All, Simple, CI-checks 1 1 Major 39 %
Identical Consecutive Expression All, Analyze 2 2 Minor 58 %
If With Same Conditions Analyze, All, Simple, CI-checks 30 11 Major 44 %
Iffectations Analyze, All 23 16 Minor 80 %
Implode() Arguments Order All, Analyze, CI-checks 5 4 Minor 0 %
Inconsistent Elseif All, Analyze 21 20 Major 73 %
list() May Omit Variables Analyze, All, Simple, Suggestions, Level 3, CI-checks 2 2 Minor 37 %
Long Arguments All, Analyze 450 185 Minor 67 %
Max Level Of Nesting All, Analyze 42 31 Minor 0 %
Merge If Then All, Analyze, CI-checks 179 90 Minor 0 %
Mismatched Ternary Alternatives All, Analyze, Suggestions, Level 4 4 3 Major 62 %
Missing Cases In Switch All, Analyze 5 5 Minor 2 %
Missing New ? All, Analyze 3 3 Critical 5 %
Modernize Empty With Expression All, Analyze, OneFile, Simple 7 6 Minor 56 %
Multiple Type Variable All, Analyze, Level 4 4 4 Minor 43 %
Multiply By One Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 8 3 Minor 17 %
Nested Ifthen Analyze, All, RadwellCodes 264 126 Major 87 %
Nested Ternary Analyze, ClearPHP, All, Simple, Level 1, CI-checks 6 3 Major 20 %
Don't Change Incomings Analyze, All 102 58 Minor 44 %
No Choice Analyze, All, Simple, Level 2, Top10, CI-checks 8 3 Major 43 %
No Direct Usage Analyze, All, Simple 1 1 Major 36 %
No Hardcoded Ip Analyze, ClearPHP, Security, All, Simple 41 1 Minor 24 %
No isset() With empty() All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4, CI-checks 50 31 Minor 28 %
No Need For Else All, Analyze 28 24 Minor 74 %
No Parenthesis For Language Construct Analyze, ClearPHP, All, RadwellCodes, Simple, Suggestions, Level 2, CI-checks 249 143 Minor 61 %
Avoid Substr() One Analyze, Performances, All, CompatibilityPHP71, Simple, Level 2, Suggestions, Top10, CI-checks 17 12 Minor 57 %
Variable Is Not A Condition All, Analyze 20 12 Minor 57 %
@ Operator Appinfo, ClearPHP, All, Analyze, Performances, CI-checks 18 11 Minor 66 %
Several Instructions On The Same Line Analyze, All 205 85 Major 57 %
Phpinfo OneFile, All, Simple, Security 1 1 Major 14 %
Print And Die Analyze, All, Simple, CI-checks 8 3 Minor 29 %
Printf Number Of Arguments All, Analyze, CI-checks 1 1 Minor 42 %
Repeated print() Analyze, All, Simple, Suggestions, Level 3, Top10, CI-checks 10 10 Major 49 %
Return True False Analyze, All, Simple, Level 1, CI-checks 17 7 Major 53 %
Same Conditions In Condition Analyze, All, Simple, CI-checks 14 12 Critical 49 %
Should Make Ternary All, Analyze, OneFile, Simple, CI-checks 152 103 Minor 85 %
Preprocessable Analyze, All, Rector 406 133 Minor 86 %
Static Loop Analyze, All, Simple, Level 4 176 112 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 3 3 Minor 79 %
Switch Without Default Analyze, ClearPHP, All, Simple, CI-checks 33 31 Major 68 %
Timestamp Difference Analyze, All, Simple, Level 3, CI-checks 6 4 Major 50 %
Unchecked Resources Analyze, ClearPHP, All, Simple, Level 2, CI-checks 3 2 Major 49 %
Unpreprocessed Values Analyze, OneFile, ClearPHP, All, Simple 5 5 Minor 28 %
Unreachable Code Dead code, OneFile, ClearPHP, All, Simple, Suggestions, Level 3 9 3 Major 44 %
Unused Global Analyze, All, Simple 7 4 Minor 18 %
Use Constant PHP recommendations, All, Analyze, php-cs-fixable, CI-checks 3 2 Minor 0 %
Use Positive Condition All, Analyze, OneFile, Simple 78 69 Minor 81 %
Useless Casting All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4, CI-checks 7 4 Minor 37 %
Useless Check All, Analyze, OneFile, Simple, Level 1, CI-checks 1 1 Minor 48 %
Useless Global Analyze, OneFile, All, Simple, Level 2 1 1 Minor 24 %
Useless Parenthesis Analyze, All, Simple, CI-checks 138 73 Minor 81 %
Useless Switch Analyze, All, Simple 1 1 Major 30 %
One Variable String Analyze, All, RadwellCodes, Simple, CI-checks 1 1 Minor 29 %
Should Typecast Analyze, OneFile, All, Simple, CI-checks 7 3 Minor 47 %
String May Hold A Variable Analyze, All, Simple 4 2 Minor 58 %
Assigned Twice All, Analyze 380 105 Minor 78 %
Overwritten Literals Analyze, All 384 105 Major 78 %
Php 7 Indirect Expression CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, CompatibilityPHP70, All 2 1 Major 14 %
Strange Name For Variables All, Analyze 17 9 Minor 28 %
Undefined Variable All, Analyze, CI-checks 3178 288 Minor 77 %
Used Once Variables Analyze, OneFile, All, Simple, Top10 5 4 Minor 87 %
Used Once Variables (In Scope) Analyze, ClearPHP, OneFile, All, Simple, Level 4 315 251 Minor 95 %
Written Only Variables Analyze, OneFile, All, Simple 63 31 Minor 78 %