PHP Static analysis for mantisbt

Label Recipes Issues Files Severity Frequence
Ambiguous Array Index Analyze, All, Simple, Level 2 75 13 Minor 9 %
Non-constant Index In Array Analyze, All, Simple 6 3 Minor 26 %
Null Or Boolean Arrays All, Analyze 26 9 Minor 0 %
Randomly Sorted Arrays All, Analyze, Level 4, Suggestions 2 1 Minor 41 %
String Initialization All, CompatibilityPHP71 12 3 Minor 33 %
Too Many Array Dimensions All, Analyze 8 3 Minor 0 %
Ambiguous Static All, Analyze 8 7 Minor 64 %
Ambiguous Visibilities All, Analyze 71 35 Minor 70 %
Avoid Optional Properties All, Analyze 66 20 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 3 3 Minor 65 %
Class Could Be Final All, Analyze, ClassReview 86 76 Minor 95 %
Method Could Be Static All, Analyze, ClassReview 94 20 Minor 95 %
Different Argument Counts All, Analyze, ClassReview 2 1 Minor 0 %
No Direct Call To Magic Method Analyze, All, Level 2, CI-checks 1 1 Major 41 %
Empty Classes Analyze, All, Simple 4 4 Minor 58 %
Hidden Nullable All, Analyze, ClassReview 95 24 Minor 0 %
Incompatible Signature Methods With Covariance All, Analyze 32 15 Critical 0 %
Locally Unused Property Dead code, All, Simple 102 17 Minor 76 %
Assign Default To Properties Analyze, ClearPHP, All, Simple, Level 2 11 6 Minor 49 %
Make Global A Property Analyze, All, Simple 21 15 Minor 33 %
Method Signature Must Be Compatible All, Analyze, LintButWontExec 2 1 Critical 50 %
No Public Access Analyze, All 15 5 Minor 60 %
Forgotten Visibility Analyze, ClearPHP, All, Simple, Level 1, CI-checks 221 54 Minor 42 %
Property Could Be Local All, Analyze, ClassReview 32 18 Minor 71 %
Never Used Properties Analyze, All, Simple 60 13 Minor 72 %
Property Used In One Method Only All, Analyze 19 10 Minor 84 %
Redefined Default Analyze, All, Simple, CI-checks 7 4 Major 26 %
Could Use self Analyze, All, Simple, Suggestions, Level 3, ClassReview 43 4 Minor 57 %
Should Use Local Class Analyze, ClearPHP, All, Simple 74 27 Minor 94 %
Static Methods Called From Object Analyze, All, Simple, CI-checks 3 2 Minor 38 %
Undefined Classes Analyze, All 148 46 Major 91 %
Undefined Class Constants Analyze, All, CI-checks 10 3 Major 53 %
Undefined Parent Analyze, All, Simple 6 2 Minor 63 %
Undefined Properties Analyze, ClearPHP, All, Simple, CI-checks 1 1 Major 58 %
Unresolved Catch Dead code, ClearPHP, All 3 2 Major 51 %
Unresolved Classes Analyze, All 22 15 Major 86 %
Unused Classes Dead code, All, Simple, Analyze 1 1 Major 72 %
Unused Class Constant All, Analyze, ClassReview 8 1 Minor 0 %
Unused Methods Dead code, All, Simple 139 41 Minor 95 %
Unused Private Methods Dead code, OneFile, All, Simple 1 1 Minor 45 %
Unused Private Properties Dead code, OneFile, All, Simple 5 5 Minor 37 %
Unused Protected Methods Dead code, All 10 2 Major 72 %
Use Class Operator All, Analyze, Performances, Simple, CI-checks 22 13 Minor 74 %
Use Instanceof Analyze, All, Simple, CI-checks 14 8 Major 63 %
Used Once Property All, Analyze 9 8 Minor 72 %
Useless Constructor Analyze, All, Simple, Level 3 2 2 Minor 38 %
Weak Typing All, Analyze 14 11 Minor 41 %
Illegal Name For Method All, Analyze, OneFile, Simple 3 2 Major 19 %
Bad Constants Names PHP recommendations, All, Analyze 1 1 Minor 2 %
Use const Analyze, Coding Conventions, All, Top10, CI-checks 633 41 Minor 57 %
Constants With Strange Names Analyze, All, Simple, CI-checks 540 38 Minor 1 %
Constants Created Outside Its Namespace Analyze, All 1 1 Minor 0 %
Invalid Constant Name Analyze, All, Simple 540 38 Major 1 %
Multiple Constant Definition Analyze, All, Simple, CI-checks 397 38 Minor 32 %
Undefined Constants Analyze, All, Simple, CompatibilityPHP72, CI-checks 26 16 Minor 54 %
Unused Constants Dead code, All, Simple 62 4 Minor 36 %
Catch Undefined Variable All, Analyze 2 1 Minor 0 %
Undefined Caught Exceptions Dead code, All 3 2 None 50 %
Uncaught Exceptions Analyze, All 19 7 Minor 81 %
Unthrown Exception Analyze, Dead code, ClearPHP, All, Simple 2 2 Minor 43 %
Useless Catch All, Analyze, CI-checks 2 1 Minor 47 %
ext/mcrypt Appinfo, All, CompatibilityPHP71 2 1 Major 14 %
Missing Include All, Analyze 211 200 Critical 61 %
Aliases Usage Analyze, ClearPHP, OneFile, All, Simple, Level 1, CI-checks 4 3 Minor 42 %
Use Named Boolean In Argument Definition All, Analyze 172 61 Minor 84 %
Callback Needs Return All, Analyze, CI-checks 6 5 Major 51 %
Could Make A Function All, Analyze, Suggestions 5410 364 Minor 75 %
Empty Function Analyze, All, Simple 15 7 Minor 71 %
Hardcoded Passwords Analyze, OneFile, Security, All, Simple, Level 3 24 16 Major 61 %
Mismatch Parameter Name All, Analyze, CompatibilityPHP80 1 1 Minor 0 %
Mismatched Default Arguments All, Analyze, Typechecks 406 68 Minor 33 %
Mismatched Typehint All, Analyze, Typechecks 72 19 Major 5 %
Modified Typed Parameter All, Analyze, ClassReview 14 8 Minor 0 %
Never Used Parameter All, Analyze, Suggestions 189 60 Minor 47 %
No Boolean As Default All, Analyze 172 61 Minor 84 %
No Return Used All, Analyze, Suggestions, Level 4 11 11 Minor 41 %
Nullable With Constant All, CompatibilityPHP80 1 1 Minor 0 %
Only Variable Passed By Reference All, Analyze 5 5 Critical 40 %
Relay Function Analyze, All 20 15 Major 83 %
Too Many Local Variables All, Analyze 54 30 Minor 65 %
Typehinted References All, Analyze, CI-checks 10 9 Minor 12 %
Undefined Functions Analyze, All, CI-checks 534 137 Major 71 %
Unused Arguments Analyze, All, Simple 89 30 Major 89 %
Unused Functions Dead code, All, Simple 416 54 Minor 53 %
Unused Inherited Variable In Closure All, Analyze, Dead code, CI-checks 1 1 Major 22 %
Unused Returned Value All, Analyze, OneFile, Dead code, Simple 1020 236 Minor 39 %
Use Constant As Arguments Analyze, All, Simple, CI-checks 282 111 Major 25 %
Useless Referenced Argument All, Analyze 8 8 Minor 57 %
Useless Return Analyze, OneFile, All, Simple, Level 4 5 5 Minor 29 %
Useless Type Check All, Dead code, OneFile 1 1 Minor 0 %
Uses Default Values Analyze, All, Simple, CI-checks 1697 250 Minor 97 %
Methods Without Return All, Analyze 799 141 Minor 0 %
Wrong Argument Type All, Analyze, Typechecks 30 17 Minor 0 %
Wrong Number Of Arguments Analyze, OneFile, All, Simple, CI-checks 72 37 Major 38 %
Wrong Optional Parameter Analyze, All, Simple, Level 1, CI-checks 1 1 Minor 38 %
Wrong Type With Call All, Analyze, Typechecks, CI-checks 32 20 Minor 0 %
Interfaces Is Not Implemented All, Analyze, ClassReview, LintButWontExec, CI-checks 3 3 Minor 0 %
Undefined Interfaces Analyze, All, CI-checks 92 25 Major 67 %
Useless Interfaces Analyze, ClearPHP, All, Simple, ClassReview, Typechecks 2 2 Minor 57 %
Fully Qualified Constants Analyze, All 1 1 Minor 0 %
Hidden Use Expression Analyze, OneFile, All, Simple, CI-checks 37 33 Minor 24 %
Unresolved Use Analyze, ClearPHP, All, Simple 4 2 Major 65 %
Unused Use Dead code, ClearPHP, All, Simple 3 3 Major 54 %
Use With Fully Qualified Name Analyze, Coding Conventions, PHP recommendations, All, Simple 2 1 Minor 16 %
No array_merge() In Loops Analyze, Performances, ClearPHP, All, Simple, Level 2, Top10, CI-checks 14 12 Major 55 %
Logical To in_array All, Analyze, Level 2 18 10 Minor 66 %
Memoize MagicCall All, Analyze, ClassReview 1 1 Minor 0 %
Pre-increment Analyze, Performances, All, Simple, Level 4, CI-checks 181 69 Minor 74 %
strpos() Too Much All, Analyze, CI-checks 13 7 Minor 46 %
array_key_exists() Works On Arrays All, CompatibilityPHP74, Analyze 22 16 Minor 0 %
Assumptions All, Analyze 135 39 Minor 0 %
Avoid set_error_handler $context Argument All, CompatibilityPHP72 4 3 Major 16 %
Use random_int() Analyze, Security, All, CompatibilityPHP71, Simple, Level 2, CI-checks 11 6 Major 59 %
Don't Pollute Global Space All, Analyze 2684 235 Minor 0 %
Use === null Analyze, OneFile, All, RadwellCodes, Simple, php-cs-fixable, CI-checks 107 50 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, CI-checks 6 2 Minor 42 %
No Class In Global All, Analyze, CI-checks 2019 207 Minor 78 %
PHP Keywords As Names Analyze, All, Simple 37 9 Major 89 %
Scalar Are Not Arrays All, Analyze, CompatibilityPHP74, CI-checks 152 10 Minor 0 %
Should Use Coalesce Analyze, All, Simple, Suggestions, Level 3, CI-checks 84 21 Major 71 %
Use Nullable Type All, Appinfo, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 364 70 Major 21 %
Avoid Using stdClass All, Analyze, OneFile, Simple, Level 4 13 5 Minor 45 %
Usort Sorting In PHP 7.0 CompatibilityPHP70, All 11 7 Major 46 %
Wrong Type For Native PHP Function All, Analyze, CI-checks 498 157 Minor 0 %
Always Anchor Regex All, Security 9 7 Major 65 %
Avoid Those Hash Functions Security, All 15 11 Major 60 %
Direct Injection Security, All 15 9 Major 41 %
Encoded Simple Letters All, Security 1 1 Minor 40 %
filter_input() As A Source All, Security 1 1 Minor 6 %
Indirect Injection Security, All 52 26 Critical 21 %
Keep Files Access Restricted All, Security 1 1 Minor 0 %
Should Use session_regenerateid() All, Security 1 1 Major 82 %
Unserialize Second Arg Security, All 3 3 Critical 49 %
Adding Zero Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 8 5 Minor 33 %
Altering Foreach Without Reference Analyze, ClearPHP, All, Simple, Level 1, CI-checks 6 5 Major 52 %
Constant Comparison All, Analyze 24 15 Minor 0 %
Array_merge Needs Array Of Arrays All, Analyze 29 15 Minor 0 %
Same Variable Foreach All, Analyze, CI-checks 1 1 Minor 12 %
Bail Out Early All, Analyze, OneFile, Simple, Level 4 40 26 Minor 92 %
Strict Comparison With Booleans Analyze, All, Simple, Suggestions, Level 2, CI-checks 328 75 Minor 76 %
Buried Assignation Analyze, All 17 16 Minor 82 %
Cast To Boolean Analyze, OneFile, All, Simple, Level 1 21 13 Minor 55 %
Casting Ternary All, Analyze, OneFile, CI-checks 2 1 Major 0 %
Check All Types All, Analyze 65 36 Major 68 %
Check JSON All, Analyze, CI-checks 34 11 Major 64 %
Common Alternatives Analyze, All, Simple 191 44 Major 61 %
Concat Empty String All, Analyze, OneFile 1 1 Minor 0 %
Could Be Else All, Analyze 10 7 Minor 48 %
Could Be Static Analyze, OneFile, All, ClassReview 3 3 Major 20 %
Could Use __DIR__ Analyze, All, Simple, Suggestions, Level 3, php-cs-fixable, CI-checks 61 44 Major 56 %
Could Use Short Assignation Analyze, OneFile, Performances, All, Simple, CI-checks 48 7 Minor 60 %
Could Use str_repeat() All, Analyze, Level 1, Top10, CI-checks 1 1 Minor 12 %
Dangling Array References PHP recommendations, Analyze, ClearPHP, All, Simple, Level 1, Top10, CI-checks 3 3 Major 40 %
__DIR__ Then Slash All, Analyze, Level 3, CI-checks 1 1 Major 13 %
Dont Change The Blind Var All, Analyze 54 36 Minor 72 %
Dont Mix ++ All, Analyze 12 8 Minor 43 %
Double Assignation Analyze, All 6 6 Major 55 %
Double Instructions Analyze, All, Simple 30 18 Minor 57 %
Drop Else After Return All, Analyze, OneFile, Simple, Suggestions, Level 4, CI-checks 47 25 Minor 70 %
Echo With Concat Performances, Analyze, All, Simple, Suggestions 888 95 Minor 58 %
Else If Versus Elseif Analyze, All, Simple, php-cs-fixable, Rector, CI-checks 230 103 Minor 65 %
Empty Blocks Analyze, All, Simple, CI-checks 5 4 Minor 57 %
Empty Instructions Dead code, Analyze, All, Simple 2683 107 Minor 43 %
Eval() Usage Analyze, Appinfo, Performances, OneFile, ClearPHP, All, Simple, Security 3 2 Major 37 %
eval() Without Try Analyze, All, Simple, Level 3, Security, CI-checks 2 2 Critical 34 %
Exit() Usage Analyze, Appinfo, OneFile, ClearPHP, All, CI-checks 47 27 Major 60 %
Switch Fallthrough All, Inventory, Security, Stats 3 3 Minor 37 %
Overwritten Source And Value All, Analyze, OneFile 1 1 Minor 0 %
Global Usage Analyze, Appinfo, ClearPHP, All 513 81 Minor 52 %
Htmlentities Calls Analyze, All, Simple, CI-checks 110 21 Major 39 %
Identical Consecutive Expression All, Analyze 7 7 Minor 58 %
If With Same Conditions Analyze, All, Simple, CI-checks 20 9 Major 44 %
Iffectations Analyze, All 25 19 Minor 80 %
Implode() Arguments Order All, Analyze, CI-checks 13 4 Minor 0 %
Inconsistent Elseif All, Analyze 12 12 Major 73 %
Infinite Recursion All, Analyze 2 2 Major 0 %
Invalid Regex All, Analyze, CI-checks 2 2 Major 18 %
list() May Omit Variables Analyze, All, Simple, Suggestions, Level 3, CI-checks 10 2 Minor 37 %
Logical Mistakes Analyze, All, Simple, Level 1, CI-checks 4 3 Critical 31 %
Long Arguments All, Analyze 25 10 Minor 67 %
Max Level Of Nesting All, Analyze 38 25 Minor 0 %
Merge If Then All, Analyze, CI-checks 123 68 Minor 0 %
Mismatched Ternary Alternatives All, Analyze, Suggestions, Level 4 5 3 Major 62 %
Missing Cases In Switch All, Analyze 6 3 Minor 2 %
Mixed Concat And Interpolation All, Coding Conventions, Analyze 5 3 Minor 43 %
Modernize Empty With Expression All, Analyze, OneFile, Simple 23 16 Minor 56 %
Multiples Identical Case Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 72 37 Minor 10 %
Multiple Type Variable All, Analyze, Level 4 14 9 Minor 43 %
Multiply By One Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 4 3 Minor 17 %
Nested Ifthen Analyze, All, RadwellCodes 293 100 Major 87 %
Nested Ternary Analyze, ClearPHP, All, Simple, Level 1, CI-checks 3 1 Major 20 %
Next Month Trap All, Analyze, Top10, CI-checks 2 1 Major 7 %
Don't Change Incomings Analyze, All 7 6 Minor 44 %
No Choice Analyze, All, Simple, Level 2, Top10, CI-checks 3 3 Major 43 %
No Empty Regex All, Analyze, CI-checks 3 1 Critical 1 %
No Hardcoded Path Analyze, ClearPHP, All, Simple 5 4 Major 33 %
No isset() With empty() All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4, CI-checks 3 2 Minor 28 %
No Need For Else All, Analyze 67 33 Minor 74 %
No Parenthesis For Language Construct Analyze, ClearPHP, All, RadwellCodes, Simple, Suggestions, Level 2, CI-checks 420 264 Minor 61 %
Avoid Substr() One Analyze, Performances, All, CompatibilityPHP71, Simple, Level 2, Suggestions, Top10, CI-checks 10 6 Minor 57 %
Variable Is Not A Condition All, Analyze 961 183 Minor 57 %
@ Operator Appinfo, ClearPHP, All, Analyze, Performances, CI-checks 36 18 Minor 66 %
Objects Don't Need References Analyze, ClearPHP, OneFile, All, Simple, Level 2, Top10, CI-checks 12 8 Minor 31 %
include_once() Usage Analyze, Appinfo, All 319 247 Minor 73 %
Several Instructions On The Same Line Analyze, All 129 30 Major 57 %
openssl_random_pseudo_byte() Second Argument All, CompatibilityPHP74 1 1 Minor 0 %
PHP7 Dirname CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, All, Suggestions, php-cs-fixable 22 18 Minor 42 %
Print And Die Analyze, All, Simple, CI-checks 10 6 Minor 29 %
Avoid Parenthesis Analyze, All, Simple, CI-checks 6 3 Minor 10 %
Printf Number Of Arguments All, Analyze, CI-checks 1 1 Minor 42 %
Random Without Try Security, All 1 1 Critical 21 %
Repeated print() Analyze, All, Simple, Suggestions, Level 3, Top10, CI-checks 418 71 Major 49 %
Repeated Regex All, Analyze, Level 1, CI-checks 1 1 Minor 47 %
Results May Be Missing Analyze, All, Simple, CI-checks 3 3 Major 18 %
Return True False Analyze, All, Simple, Level 1, CI-checks 32 21 Major 53 %
Same Conditions In Condition Analyze, All, Simple, CI-checks 38 19 Critical 49 %
Should Chain Exception Analyze, All, Simple, CI-checks 1 1 Minor 36 %
Should Make Ternary All, Analyze, OneFile, Simple, CI-checks 380 138 Minor 85 %
Preprocessable Analyze, All, Rector 377 90 Minor 86 %
Should Use Explode Args All, Analyze, CI-checks 2 1 Minor 0 %
Static Loop Analyze, All, Simple, Level 4 15 13 Minor 65 %
Strpos()-like Comparison Analyze, PHP recommendations, ClearPHP, All, Simple, Level 2, Top10, CI-checks 7 5 Major 54 %
Suspicious Comparison All, Analyze, Level 3 10 8 Major 15 %
Switch To Switch Analyze, All, RadwellCodes, Simple 8 8 Minor 79 %
Switch Without Default Analyze, ClearPHP, All, Simple, CI-checks 73 47 Major 68 %
Test Then Cast All, Analyze 44 20 Major 32 %
Timestamp Difference Analyze, All, Simple, Level 3, CI-checks 11 10 Major 50 %
Unchecked Resources Analyze, ClearPHP, All, Simple, Level 2, CI-checks 5 4 Major 49 %
Unconditional Break In Loop All, Analyze, Level 3, CI-checks 2 2 Major 46 %
Unreachable Code Dead code, OneFile, ClearPHP, All, Simple, Suggestions, Level 3 50 34 Major 44 %
Unsupported Types With Operators All, Analyze, CompatibilityPHP80 2 2 Minor 0 %
Unused Global Analyze, All, Simple 2 1 Minor 18 %
Use Constant PHP recommendations, All, Analyze, php-cs-fixable, CI-checks 67 45 Minor 0 %
Avoid get_class() Analyze, All, Simple, CI-checks 2 1 Minor 32 %
Use Positive Condition All, Analyze, OneFile, Simple 167 84 Minor 81 %
Useless Casting All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4, CI-checks 12 7 Minor 37 %
Useless Check All, Analyze, OneFile, Simple, Level 1, CI-checks 4 2 Minor 48 %
Useless Global Analyze, OneFile, All, Simple, Level 2 3 3 Minor 24 %
Useless Instructions Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 2 2 Minor 58 %
Useless Parenthesis Analyze, All, Simple, CI-checks 138 65 Minor 81 %
Useless Switch Analyze, All, Simple 9 6 Major 30 %
Useless Unset Analyze, OneFile, ClearPHP, All, Simple, Level 2, CI-checks 1 1 Major 28 %
var_dump()... Usage Analyze, ClearPHP, Security, All, CI-checks 3 2 Critical 40 %
One Variable String Analyze, All, RadwellCodes, Simple, CI-checks 2 2 Minor 29 %
Should Typecast Analyze, OneFile, All, Simple, CI-checks 5 5 Minor 47 %
String May Hold A Variable Analyze, All, Simple 42 12 Minor 58 %
Assigned Twice All, Analyze 453 56 Minor 78 %
Overwritten Literals Analyze, All 510 56 Major 78 %
Strange Name For Variables All, Analyze 1 1 Minor 28 %
Undefined Constant Name All, Analyze 28 5 Minor 0 %
Undefined Variable All, Analyze, CI-checks 719 67 Minor 77 %
Used Once Variables Analyze, OneFile, All, Simple, Top10 571 61 Minor 87 %
Used Once Variables (In Scope) Analyze, ClearPHP, OneFile, All, Simple, Level 4 973 169 Minor 95 %
Written Only Variables Analyze, OneFile, All, Simple 356 86 Minor 78 %