PHP Static analysis for CodeIgniter

Label Recipes Issues Files Severity Frequence
Null Or Boolean Arrays All, Analyze 26 3 Minor 0 %
Randomly Sorted Arrays All, Analyze, Level 4, Suggestions 3 2 Minor 41 %
String Initialization All, CompatibilityPHP71 116 25 Minor 69 %
Too Many Array Dimensions All, Analyze 8 1 Minor 0 %
Ambiguous Static All, Analyze 2 2 Minor 66 %
Ambiguous Visibilities All, Analyze 17 15 Minor 70 %
Avoid option arrays in constructors All, Analyze, ClassReview 3 3 Minor 0 %
Avoid Optional Properties All, Analyze 202 40 Major 84 %
Child Class Removes Typehint All, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP71, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, Typechecks 2 2 Major 47 %
Could Be Abstract Class All, Analyze, ClassReview 7 6 Minor 65 %
Class Could Be Final All, Analyze, ClassReview 119 116 Minor 96 %
Method Could Be Static All, Analyze, ClassReview 204 64 Minor 92 %
Dependant Abstract Classes All, Analyze, ClassReview 1 1 Minor 0 %
Different Argument Counts All, Analyze, ClassReview 20 15 Minor 0 %
Empty Classes Analyze, All, Simple 1 1 Minor 60 %
Hidden Nullable Typehint All, Analyze, ClassReview 2 1 Minor 0 %
Incompatible Signature Methods With Covariance All, Analyze 2 1 Critical 0 %
Locally Unused Property Dead code, All, Simple 171 60 Minor 76 %
Assign Default To Properties Analyze, ClearPHP, All, Simple, Level 2 24 16 Minor 71 %
Method Signature Must Be Compatible All, Analyze, LintButWontExec 45 29 Critical 53 %
Multiple Class Declarations Analyze, All, Simple, CI-checks, CE 2 2 Major 29 %
No Public Access Analyze, All 240 39 Minor 61 %
Non Nullable Getters All, Analyze, ClassReview 4 4 Minor 0 %
Never Used Properties Analyze, All, Simple 28 8 Minor 71 %
Property Used In One Method Only All, Analyze 158 45 Minor 84 %
Scalar Or Object Property All, Analyze 5 4 Minor 32 %
Could Use self Analyze, All, Simple, Suggestions, Level 3, ClassReview 1 1 Minor 63 %
Should Use Local Class Analyze, ClearPHP, All, Simple 175 38 Minor 95 %
Wrong Access Style to Property All, Analyze, Level 2, ClassReview, CI-checks, CE 1 1 Critical 37 %
Undefined Classes Analyze, All, Stubs 37 7 Major 91 %
Undefined Class Constants Analyze, All, CI-checks, Stubs, CE 17 3 Major 62 %
Undefined Properties Analyze, ClearPHP, All, Simple, CI-checks, CE 797 88 Major 61 %
Unfinished Object All, Analyze, ClassReview 336 75 Major 0 %
Unresolved Classes Analyze, All, Stubs 3 2 Major 76 %
Unresolved Instanceof Analyze, Dead code, ClearPHP, All, Simple, Top10 6 1 Major 48 %
Unused Classes Dead code, All, Simple, Analyze 4 4 Major 67 %
Unused Methods Dead code, All, Simple 525 91 Minor 96 %
Unused Private Methods Dead code, OneFile, All, Simple 1 1 Minor 50 %
Unused Protected Methods Dead code, All 145 56 Major 68 %
Use ::Class Operator All, Analyze, Performances, Simple, CI-checks, CE 18 10 Minor 71 %
Use Instanceof Analyze, All, Simple, CI-checks, CE 33 15 Major 63 %
Used Once Property All, Analyze 3 2 Minor 74 %
Weak Typing All, Analyze 1 1 Minor 47 %
Use const Analyze, Coding Conventions, All, Top10, CI-checks, CE 32 5 Minor 54 %
Invalid Constant Name Analyze, All, Simple 27 4 Major 51 %
Multiple Constant Definition Analyze, All, Simple, CI-checks, CE 12 4 Minor 41 %
Undefined Constants stubs 21 9 Minor 71 %
Unused Constants Dead code, All, Simple 3 1 Minor 39 %
Undefined Caught Exceptions Dead code, All 3 2 None 53 %
Uncaught Exceptions Analyze, All 17 7 Minor 84 %
Useless Catch All, Analyze, CI-checks, CE 1 1 Minor 44 %
ext/mcrypt Appinfo, All, CompatibilityPHP71, CE 30 3 Major 15 %
Missing Include All, Analyze 36 12 Critical 65 %
Native Alias Functions Usage Analyze, ClearPHP, OneFile, All, Simple, Level 1, CI-checks, CE 22 4 Minor 42 %
Use Named Boolean In Argument Definition All, Analyze 159 70 Minor 84 %
Callback Function Needs Return All, Analyze, CI-checks, CE 1 1 Major 42 %
Cancelled Parameter All, Analyze 2 2 Minor 0 %
Could Make A Function All, Analyze, Suggestions 1059 191 Minor 66 %
Deep Definitions Analyze, Appinfo, All, Simple, CE 1 1 Major 13 %
Empty Function Analyze, All, Simple 3 2 Minor 74 %
Hardcoded Passwords Analyze, OneFile, Security, All, Simple, Level 3 15 5 Major 70 %
Mismatch Parameter Name All, Analyze, CompatibilityPHP80, CE 12 6 Minor 0 %
Mismatched Default Arguments All, Analyze, Typechecks 124 39 Minor 80 %
Must Return Methods Analyze, All, Simple, Level 2, LintButWontExec, CI-checks, CE 3 3 Major 34 %
Never Called Parameter All, Analyze, Suggestions, Rector 36 27 Minor 92 %
No Boolean As Default All, Analyze 159 70 Minor 84 %
No Return Used All, Analyze, Suggestions, Level 4 16 11 Minor 69 %
Redeclared PHP Functions Analyze, Appinfo, All, Simple, CI-checks, CE 13 6 Minor 26 %
Relay Function Analyze, All 67 25 Major 84 %
Too Many Local Variables All, Analyze 7 7 Minor 64 %
Typehinted References All, Analyze, CI-checks, CE 2 2 Minor 37 %
Undefined Functions stubs 156 21 Major 68 %
Unused Parameter Analyze, All, Simple 30 20 Major 90 %
Unused Returned Value All, Analyze, OneFile, Dead code, Simple 9 5 Minor 41 %
Use Constant As Arguments Analyze, All, Simple, CI-checks, CE 2 2 Major 30 %
Useless Referenced Argument All, Analyze 33 26 Minor 58 %
Uses Default Values Analyze, All, Simple, CI-checks, CE 1420 127 Minor 98 %
Methods Without Return All, Analyze 154 76 Minor 95 %
Wrong Number Of Arguments Analyze, OneFile, All, Simple, CI-checks, Stubs, CE 12 9 Major 81 %
Wrong Type Returned All, Analyze, ClassReview, CI-checks, CE 104 47 Minor 0 %
Wrong Type With Call All, Analyze, Typechecks, CI-checks, CE 7 1 Minor 0 %
Forgotten Interface All, Analyze 4 4 Minor 48 %
Undefined Interfaces Analyze, All, CI-checks, CE, LintButWontExec 6 1 Major 72 %
Useless Interfaces Analyze, ClearPHP, All, Simple, ClassReview, Typechecks 1 1 Minor 59 %
No array_merge() In Loops Analyze, Performances, ClearPHP, All, Simple, Level 2, Top10, CI-checks, CE 3 2 Major 57 %
Logical To in_array All, Analyze, Level 2 11 8 Minor 67 %
Memoize MagicCall All, Analyze, ClassReview 2 1 Minor 0 %
Pre-increment Analyze, Performances, All, Simple, Level 4, CI-checks, CE 178 74 Minor 74 %
strpos() Too Much All, Analyze, CI-checks, CE 10 8 Minor 49 %
array_key_exists() Works On Arrays All, CompatibilityPHP74, Analyze, CE 7 6 Minor 0 %
Assumptions All, Analyze 10 6 Minor 0 %
Avoid get_object_vars() All, CompatibilityPHP74, CompatibilityPHP80 7 4 Minor 0 %
Use random_int() Analyze, Security, All, CompatibilityPHP71, Simple, Level 2, CI-checks, CE 32 9 Major 59 %
Deprecated PHP Functions Analyze, All, CI-checks, CE 1 1 Major 23 %
Don't Pollute Global Space All, Analyze 323 156 Minor 0 %
False To Array Conversion All, LintButWontExec, CompatibilityPHP81, CompatibilityPHP82, Analyze, CE 106 21 Minor 0 %
Wrong fopen() Mode Analyze, All, CI-checks, CE 1 1 Major 17 %
idn_to_ascii() New Default All, CompatibilityPHP74, CE 3 2 Minor 7 %
Wrong Parameter Type Analyze, OneFile, All, Simple, CI-checks, CE 75 32 Major 76 %
Use === null Analyze, OneFile, All, RadwellCodes, Simple, php-cs-fixable, CI-checks, CE 4 2 Minor 53 %
List With Keys CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, Appcontent, Appinfo, All, CE 1 1 Major 34 %
Logical Should Use Symbolic Operators Analyze, OneFile, ClearPHP, All, Simple, Suggestions, Level 2, Top10, php-cs-fixable, CI-checks, CE 556 190 Minor 43 %
Possible Missing Subpattern All, Analyze, Top10, CI-checks, CE 18 11 Minor 45 %
PHP Native Class Type Compatibility All, Analyze, CompatibilityPHP81 7 1 Major 0 %
No Class In Global All, Analyze, CI-checks, CE 284 154 Minor 77 %
No Null For Native PHP Functions All, Analyze, CompatibilityPHP81, Deprecated 101 31 Minor 0 %
PHP 7.0 Scalar Typehints All, CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 295 88 Critical 39 %
PHP 8.0 Typehints All, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP71, CompatibilityPHP72, CompatibilityPHP73, CompatibilityPHP54, CompatibilityPHP74, CompatibilityPHP55, CompatibilityPHP56 2 1 Minor 0 %
PHP 7.0 New Interfaces CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, All 1 1 Major 0 %
PHP 7.1 Removed Directives CompatibilityPHP71, All 4 1 Major 1 %
Php 8.0 Only TypeHints All, CompatibilityPHP70, Appinfo, CompatibilityPHP71, CompatibilityPHP72, CompatibilityPHP73, CompatibilityPHP74, CompatibilityPHP56, CE 2 1 Minor 0 %
PHP 8.0 Removed Directives All, CompatibilityPHP80, CE, CompatibilityPHP81 7 7 Minor 0 %
Scalar Are Not Arrays All, Analyze, CompatibilityPHP74, CI-checks, CE 134 22 Minor 0 %
set_exception_handler() Warning CompatibilityPHP70, All 1 1 Major 7 %
Should Use Coalesce Analyze, All, Simple, Suggestions, Level 3, CI-checks, CE 65 34 Major 71 %
String Int Comparison All, CompatibilityPHP80 1 1 Minor 0 %
Typed Property Usage All, Appinfo, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP71, CompatibilityPHP72, CompatibilityPHP73, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, CE 1 1 Minor 6 %
Unknown Pcre2 Option All, Analyze, CompatibilityPHP73 3 2 Minor 17 %
Use Nullable Type All, Appinfo, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, CE 132 36 Major 90 %
Use PHP Object API Analyze, ClearPHP, All, Simple, CI-checks, CE 3 2 Minor 27 %
Should Use SetCookie() All, Analyze 1 1 Major 6 %
Avoid Using stdClass All, Analyze, OneFile, Simple, Level 4 29 27 Minor 46 %
Wrong Type For Native PHP Function All, Analyze, CI-checks, CE 168 63 Minor 0 %
Always Anchor Regex All, Security 52 23 Major 65 %
Avoid Those Hash Functions Security, All 31 12 Major 62 %
Configure Extract All, Security 4 4 Minor 25 %
Direct Injection Security, All 22 11 Major 51 %
Don't Echo Error All, Analyze, Security, Simple, Level 1, CI-checks, CE 1 1 Critical 35 %
Encoded Simple Letters All, Security 5 1 Minor 41 %
Indirect Injection Security, All 2 2 Critical 42 %
Keep Files Access Restricted All, Security 1 1 Minor 0 %
No Net For Xml Load All, Security 13 12 Major 51 %
Avoid sleep()/usleep() Security, All 4 3 Minor 41 %
No Weak SSL Crypto All, Security, CE 1 1 Minor 0 %
Set Cookie Safe Arguments All, Security 3 3 Major 25 %
Should Use Prepared Statement Analyze, Security, All, Simple, CI-checks, CE 37 21 Major 28 %
Unserialize Second Arg Security, All 5 4 Critical 50 %
Adding Zero Dump 30 14 Minor 69 %
Altering Foreach Without Reference Analyze, ClearPHP, All, Simple, Level 1, CI-checks, CE 10 7 Major 56 %
Array_merge Needs Array Of Arrays All, Analyze 10 6 Minor 0 %
Bail Out Early All, Analyze, OneFile, Simple, Level 4 7 5 Minor 64 %
Strict Comparison With Booleans Analyze, All, Simple, Suggestions, Level 2, CI-checks, CE 34 16 Minor 77 %
Buried Assignation Analyze, All 484 105 Minor 84 %
Cast To Boolean Analyze, OneFile, All, Simple, Level 1 4 3 Minor 56 %
Casting Ternary All, Analyze, OneFile, CI-checks, CE 2 2 Major 0 %
Check All Types All, Analyze 53 27 Major 69 %
Check Division By Zero All, Analyze 12 5 Minor 0 %
Common Alternatives Analyze, All, Simple 31 24 Major 80 %
Could Use __DIR__ Analyze, All, Simple, Suggestions, Level 3, php-cs-fixable, CI-checks, CE 2 1 Major 56 %
Could Use Short Assignation Analyze, OneFile, Performances, All, Simple, CI-checks, CE, Rector 8 4 Minor 63 %
Dangling Array References PHP recommendations, Analyze, ClearPHP, All, Simple, Level 1, Top10, CI-checks, CE 21 9 Major 46 %
Dont Change The Blind Var All, Analyze 38 19 Minor 73 %
Dont Mix ++ All, Analyze 11 9 Minor 56 %
Don't Read And Write In One Expression All, Analyze, CompatibilityPHP73, CompatibilityPHP74, CE 17 12 Critical 38 %
Dont Reuse Foreach Source All, Analyze 3 3 Minor 0 %
Double Assignation Analyze, All 15 12 Major 59 %
Double Instructions Analyze, All, Simple 3 3 Minor 57 %
Drop Else After Return All, Analyze, OneFile, Simple, Suggestions, Level 4, CI-checks, CE 92 45 Minor 70 %
Echo With Concat Performances, Analyze, All, Simple, Suggestions 11 4 Minor 60 %
Else If Versus Elseif Analyze, All, Simple, php-cs-fixable, Rector, CI-checks, CE 3 3 Minor 66 %
Empty Blocks Analyze, All, Simple, CI-checks, CE 1 1 Minor 51 %
Empty Instructions Dead code, Analyze, All, Simple 6 2 Minor 57 %
Exit() Usage Analyze, Appinfo, OneFile, ClearPHP, All, CI-checks, CE 211 191 Major 61 %
Switch Fallthrough All, Inventory, Security, Stats 1 1 Minor 39 %
Foreach Reference Is Not Modified Analyze, All, Simple, CI-checks, CE 24 10 Minor 24 %
Htmlentities Calls Analyze, All, Simple, CI-checks, CE 6 2 Major 40 %
Htmlentities Using Default Flag All, Analyze, Simple, CI-checks, CE 6 2 Minor 0 %
If With Same Conditions Analyze, All, Simple, CI-checks, CE 3 2 Major 47 %
Iffectations Analyze, All 172 66 Minor 80 %
Implied If Analyze, ClearPHP, All, Simple, CI-checks, CE, Rector 427 190 Major 33 %
Implode() Arguments Order All, Analyze, CI-checks, CE 8 8 Minor 0 %
Inconsistent Elseif All, Analyze 49 27 Major 73 %
Infinite Recursion All, Analyze 1 1 Major 0 %
list() May Omit Variables Analyze, All, Simple, Suggestions, Level 3, CI-checks, CE 1 1 Minor 37 %
Long Arguments All, Analyze 9 6 Minor 68 %
Max Level Of Nesting All, Analyze 18 16 Minor 0 %
Mbstring Third Arg All, Analyze, CI-checks, CE 1 1 Minor 0 %
Merge If Then All, Analyze, CI-checks, CE 49 30 Minor 0 %
Mismatched Ternary Alternatives All, Analyze, Suggestions, Level 4 8 8 Major 64 %
Missing Cases In Switch All, Analyze 2 1 Minor 36 %
Mixed Concat And Interpolation All, Coding Conventions, Analyze 2 1 Minor 45 %
Modernize Empty With Expression All, Analyze, OneFile, Simple 46 21 Minor 63 %
Multiple Type Variable All, Analyze, Level 4 14 12 Minor 58 %
Multiply By One Dump, Dum p 1 1 Minor 44 %
Nested Ifthen Analyze, All, RadwellCodes 62 38 Major 84 %
Nested Ternary Analyze, ClearPHP, All, Simple, Level 1, CI-checks, CE 4 2 Major 50 %
Don't Change Incomings Analyze, All 15 5 Minor 44 %
No Direct Usage Analyze, All, Simple 1 1 Major 39 %
No Hardcoded Hash Analyze, Security, All, Simple 2 1 Critical 45 %
No Hardcoded Path Analyze, ClearPHP, All, Simple 1 1 Major 35 %
No Hardcoded Port Analyze, ClearPHP, Security, All, Simple 1 1 Minor 12 %
No Need For Else All, Analyze 102 48 Minor 74 %
No Need For Triple Equal All, Analyze 9 6 Minor 0 %
No Parenthesis For Language Construct Analyze, ClearPHP, All, RadwellCodes, Simple, Suggestions, Level 2, CI-checks, CE 110 31 Minor 62 %
Variable Is Not A Condition All, Analyze 60 32 Minor 93 %
@ Operator Appinfo, ClearPHP, All, Analyze, Performances, CI-checks, CE 90 29 Minor 65 %
Objects Don't Need References Analyze, ClearPHP, OneFile, All, Simple, Level 2, Top10, CI-checks, CE 5 5 Minor 40 %
include_once() Usage Analyze, Appinfo, All, CE 55 10 Minor 73 %
Several Instructions On The Same Line Analyze, All 129 63 Major 56 %
Only Variable Returned By Reference Analyze, All, Simple 1 1 Major 3 %
openssl_random_pseudo_byte() Second Argument All, CompatibilityPHP74, CE 2 2 Minor 0 %
Random Without Try Security, All 3 3 Critical 30 %
Repeated Regex All, Analyze, Level 1, CI-checks, CE 35 16 Minor 47 %
Return True False Analyze, All, Simple, Level 1, CI-checks, CE 1 1 Major 46 %
Same Conditions In Condition Analyze, All, Simple, CI-checks, CE 6 4 Critical 55 %
Should Make Ternary All, Analyze, OneFile, Simple, CI-checks, CE 64 37 Minor 86 %
Preprocessable Analyze, All, Rector 358 191 Minor 85 %
Static Loop Analyze, All, Simple, Level 4 3 3 Minor 67 %
Strpos()-like Comparison Analyze, PHP recommendations, ClearPHP, All, Simple, Level 2, Top10, CI-checks, CE 12 8 Major 54 %
Switch To Switch Analyze, All, RadwellCodes, Simple 9 6 Minor 58 %
Switch Without Default Analyze, ClearPHP, All, Simple, CI-checks, CE 8 5 Major 69 %
Test Then Cast All, Analyze 2 1 Major 34 %
Timestamp Difference Analyze, All, Simple, Level 3, CI-checks, CE 11 9 Major 49 %
Unchecked Resources Analyze, ClearPHP, All, Simple, Level 2, CI-checks, CE 3 2 Major 50 %
Unconditional Break In Loop All, Analyze, Level 3, CI-checks, CE 7 6 Major 48 %
Unreachable Code Dead code, OneFile, ClearPHP, All, Simple, Suggestions, Level 3 9 5 Major 61 %
Unsupported Types With Operators All, Analyze, CompatibilityPHP80, CE 5 3 Minor 0 %
Use Constant PHP recommendations, All, Analyze, php-cs-fixable, CI-checks, CE 2 1 Minor 61 %
Use Positive Condition All, Analyze, OneFile, Simple 54 36 Minor 82 %
Use Variable Created Inside Loop All, Dead code 8 7 Minor 0 %
Useless Type Casting All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4, CI-checks, CE 11 9 Minor 47 %
Useless Check All, Analyze, OneFile, Simple, Level 1, CI-checks, CE 12 9 Minor 35 %
Useless Instructions Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks, CE 9 9 Minor 63 %
Useless Parenthesis Analyze, All, Simple, CI-checks, CE 228 68 Minor 81 %
Useless Unset Analyze, OneFile, ClearPHP, All, Simple, Level 2, CI-checks, CE 1 1 Major 42 %
var_dump()... Usage Analyze, ClearPHP, Security, All, CI-checks, CE 1 1 Critical 42 %
Should Typecast Analyze, OneFile, All, Simple, CI-checks, CE, Rector 4 3 Minor 49 %
String May Hold A Variable Analyze, All, Simple 26 10 Minor 59 %
Missing Some Returntype All, Typehints, Analyze, CI-checks, CE 66 42 Minor 0 %
Assigned Twice All, Analyze 126 28 Minor 79 %
Overwritten Literals Analyze, All 148 28 Major 79 %
Undefined Constant Name All, Analyze 2 1 Minor 0 %
Undefined Variable All, Analyze, CI-checks, CE 503 48 Minor 77 %
Used Once Variables Analyze, OneFile, All, Simple, Top10 10 6 Minor 74 %
Used Once Variables (In Scope) Analyze, ClearPHP, OneFile, All, Simple, Level 4, CE 164 69 Minor 95 %
Written Only Variables Analyze, OneFile, All, Simple 39 11 Minor 87 %