PHP Static analysis for YOURLS

Label Recipes Issues Files Severity Frequence
Multiple Index Definition Analyze, OneFile, All, Simple, CI-checks 3 3 Minor 25 %
Non-constant Index In Array Analyze, All, Simple 16 2 Minor 26 %
Null Or Boolean Arrays All, Analyze 5 2 Minor 0 %
Randomly Sorted Arrays All, Analyze, Level 4, Suggestions 13 1 Minor 41 %
String Initialization All, CompatibilityPHP71 28 8 Minor 33 %
Too Many Array Dimensions All, Analyze 1 1 Minor 0 %
Abstract Or Implements All, Analyze, LintButWontExec 3 3 Major 4 %
Access Protected Structures Analyze, All, Simple 3 1 Major 6 %
Ambiguous Static All, Analyze 53 26 Minor 64 %
Ambiguous Visibilities All, Analyze 33 23 Minor 70 %
Avoid option arrays in constructors All, Analyze, ClassReview 3 3 Minor 0 %
Avoid Optional Properties All, Analyze 36 12 Major 83 %
Child Class Removes Typehint All, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP71, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, Typechecks 10 4 Major 1 %
Could Be Abstract Class All, Analyze, ClassReview 10 10 Minor 65 %
Class Could Be Final All, Analyze, ClassReview 119 119 Minor 95 %
Method Could Be Static All, Analyze, ClassReview 45 21 Minor 95 %
Dependant Abstract Classes All, Analyze, ClassReview 3 3 Minor 0 %
Different Argument Counts All, Analyze, ClassReview 2 2 Minor 0 %
No Direct Call To Magic Method Analyze, All, Level 2, CI-checks 2 2 Major 41 %
Don't Unset Properties All, Analyze, Top10, php-cs-fixable, CI-checks 1 1 Major 40 %
Empty Classes Analyze, All, Simple 4 4 Minor 58 %
Class Should Be Final By Ocramius All, Analyze 3 3 Minor 42 %
Hidden Nullable All, Analyze, ClassReview 9 7 Minor 0 %
Incompatible Signature Methods With Covariance All, Analyze 8 8 Critical 0 %
Locally Unused Property Dead code, All, Simple 107 50 Minor 76 %
Assign Default To Properties Analyze, ClearPHP, All, Simple, Level 2 9 7 Minor 49 %
Make Global A Property Analyze, All, Simple 7 1 Minor 33 %
Method Signature Must Be Compatible All, Analyze, LintButWontExec 3 3 Critical 50 %
No Public Access Analyze, All 20 12 Minor 60 %
Non Nullable Getters All, Analyze, ClassReview 1 1 Minor 0 %
Forgotten Visibility Analyze, ClearPHP, All, Simple, Level 1, CI-checks 18 1 Minor 42 %
Var Keyword Analyze, OneFile, ClearPHP, All, Simple, Level 1 8 1 Minor 22 %
Parent First All, Analyze, Suggestions 9 9 Minor 55 %
Property Could Be Local All, Analyze, ClassReview 36 14 Minor 71 %
Never Used Properties Analyze, All, Simple 6 6 Minor 72 %
Property Used In One Method Only All, Analyze 48 19 Minor 84 %
Could Use self Analyze, All, Simple, Suggestions, Level 3, ClassReview 9 3 Minor 57 %
Should Use Local Class Analyze, ClearPHP, All, Simple 97 35 Minor 94 %
Static Methods Called From Object Analyze, All, Simple, CI-checks 1 1 Minor 38 %
Wrong Access Style to Property All, Analyze, Level 2, ClassReview, CI-checks 12 3 Critical 3 %
Undefined Classes Analyze, All 36 15 Major 91 %
Undefined Class Constants Analyze, All, CI-checks 27 8 Major 53 %
Undefined Properties Analyze, ClearPHP, All, Simple, CI-checks 7 1 Major 58 %
Unresolved Catch Dead code, ClearPHP, All 3 2 Major 51 %
Unresolved Classes Analyze, All 8 5 Major 86 %
Unresolved Instanceof Analyze, Dead code, ClearPHP, All, Simple, Top10 1 1 Major 48 %
Unused Classes Dead code, All, Simple, Analyze 35 35 Major 72 %
Unused Class Constant All, Analyze, ClassReview 4 2 Minor 0 %
Unused Methods Dead code, All, Simple 145 43 Minor 95 %
Unused Private Methods Dead code, OneFile, All, Simple 2 1 Minor 45 %
Unused Private Properties Dead code, OneFile, All, Simple 8 1 Minor 37 %
Unused Protected Methods Dead code, All 1 1 Major 72 %
Use Class Operator All, Analyze, Performances, Simple, CI-checks 15 5 Minor 74 %
Use Instanceof Analyze, All, Simple, CI-checks 11 5 Major 63 %
Used Once Property All, Analyze 44 11 Minor 72 %
Useless Constructor Analyze, All, Simple, Level 3 1 1 Minor 38 %
Use const Analyze, Coding Conventions, All, Top10, CI-checks 99 16 Minor 57 %
Constants With Strange Names Analyze, All, Simple, CI-checks 83 16 Minor 1 %
Invalid Constant Name Analyze, All, Simple 83 16 Major 1 %
Multiple Constant Definition Analyze, All, Simple, CI-checks 63 15 Minor 32 %
Undefined Constants Analyze, All, Simple, CompatibilityPHP72, CI-checks 113 17 Minor 54 %
Catch Undefined Variable All, Analyze 1 1 Minor 0 %
Undefined Caught Exceptions Dead code, All 3 2 None 50 %
Overwritten Exceptions Analyze, All, Simple, Suggestions, Level 4, CI-checks 1 1 Minor 19 %
Uncaught Exceptions Analyze, All 55 15 Minor 81 %
Unthrown Exception Analyze, Dead code, ClearPHP, All, Simple 37 37 Minor 43 %
Useless Catch All, Analyze, CI-checks 1 1 Minor 47 %
Missing Include All, Analyze 32 8 Critical 61 %
Aliases Usage Analyze, ClearPHP, OneFile, All, Simple, Level 1, CI-checks 5 4 Minor 42 %
Use Named Boolean In Argument Definition All, Analyze 69 25 Minor 84 %
Could Make A Function All, Analyze, Suggestions 155 52 Minor 75 %
Empty Function Analyze, All, Simple 10 6 Minor 71 %
Hardcoded Passwords Analyze, OneFile, Security, All, Simple, Level 3 8 5 Major 61 %
Mismatch Parameter Name All, Analyze, CompatibilityPHP80 1 1 Minor 0 %
Mismatched Default Arguments All, Analyze, Typechecks 151 36 Minor 33 %
Mismatched Typehint All, Analyze, Typechecks 4 3 Major 5 %
Never Used Parameter All, Analyze, Suggestions 99 46 Minor 47 %
No Boolean As Default All, Analyze 69 25 Minor 84 %
No Literal For Reference All, Analyze, CI-checks 3 2 Minor 0 %
No Return Used All, Analyze, Suggestions, Level 4 5 4 Minor 41 %
Only Variable For Reference All, Analyze, LintButWontExec 3 2 Critical 24 %
Only Variable Passed By Reference All, Analyze 3 2 Critical 40 %
Redeclared PHP Functions Analyze, Appinfo, All, Simple, CI-checks 54 4 Minor 28 %
Relay Function Analyze, All 45 16 Major 83 %
Too Many Local Variables All, Analyze 10 8 Minor 65 %
Typehinted References All, Analyze, CI-checks 16 11 Minor 12 %
Undefined Functions Analyze, All, CI-checks 359 58 Major 71 %
Unused Arguments Analyze, All, Simple 21 12 Major 89 %
Unused Functions Dead code, All, Simple 100 13 Minor 53 %
Unused Returned Value All, Analyze, OneFile, Dead code, Simple 119 25 Minor 39 %
Useless Referenced Argument All, Analyze 18 12 Minor 57 %
Useless Return Analyze, OneFile, All, Simple, Level 4 1 1 Minor 29 %
Uses Default Values Analyze, All, Simple, CI-checks 723 81 Minor 97 %
Using Deprecated Method All, Analyze 5 2 Minor 0 %
Methods Without Return All, Analyze 185 60 Minor 0 %
Wrong Argument Type All, Analyze, Typechecks 4 2 Minor 0 %
Wrong Number Of Arguments Analyze, OneFile, All, Simple, CI-checks 20 12 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 18 7 Minor 0 %
Already Parents Interface Analyze, All, Level 3, Suggestions 6 6 Minor 17 %
Forgotten Interface All, Analyze 2 2 Minor 52 %
Interfaces Is Not Implemented All, Analyze, ClassReview, LintButWontExec, CI-checks 2 2 Minor 0 %
Interfaces Don't Ensure Properties All, Analyze, ClassReview 1 1 Minor 0 %
Undefined Interfaces Analyze, All, CI-checks 23 13 Major 67 %
Useless Interfaces Analyze, ClearPHP, All, Simple, ClassReview, Typechecks 9 9 Minor 57 %
Multiple Alias Definitions Analyze, All, Simple, CI-checks 26 21 Minor 42 %
Should Make Alias Analyze, OneFile, All, Simple, CI-checks 51 5 Minor 44 %
Unresolved Use Analyze, ClearPHP, All, Simple 20 11 Major 65 %
Unused Use Dead code, ClearPHP, All, Simple 2 2 Major 54 %
Use With Fully Qualified Name Analyze, Coding Conventions, PHP recommendations, All, Simple 1 1 Minor 16 %
No array_merge() In Loops Analyze, Performances, ClearPHP, All, Simple, Level 2, Top10, CI-checks 1 1 Major 55 %
Logical To in_array All, Analyze, Level 2 34 12 Minor 66 %
Memoize MagicCall All, Analyze, ClassReview 1 1 Minor 0 %
Pre-increment Analyze, Performances, All, Simple, Level 4, CI-checks 85 28 Minor 74 %
strpos() Too Much All, Analyze, CI-checks 5 2 Minor 46 %
array_key_exists() Works On Arrays All, CompatibilityPHP74, Analyze 4 3 Minor 0 %
Assumptions All, Analyze 4 2 Minor 0 %
Use random_int() Analyze, Security, All, CompatibilityPHP71, Simple, Level 2, CI-checks 5 3 Major 59 %
Detect Current Class All, Suggestions, CompatibilityPHP74 2 1 None 47 %
Don't Pollute Global Space All, Analyze 619 102 Minor 0 %
Wrong Parameter Type Analyze, OneFile, All, Simple, CI-checks 15 9 Major 45 %
Use === null Analyze, OneFile, All, RadwellCodes, Simple, php-cs-fixable, CI-checks 9 8 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 28 14 Minor 42 %
Possible Missing Subpattern All, Analyze, Top10, CI-checks 6 5 Minor 40 %
No Class In Global All, Analyze, CI-checks 490 89 Minor 78 %
PHP 7.0 Scalar Typehints All, CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 4 1 Critical 31 %
PHP 7.2 Deprecations All, CompatibilityPHP72 1 1 Major 1 %
New Constants In PHP 7.2 All, CompatibilityPHP72 5 1 Major 0 %
PHP 8.0 Removed Constants All, CompatibilityPHP80 1 1 Critical 0 %
PHP 8.0 Removed Directives All, CompatibilityPHP80 1 1 Minor 0 %
PHP Keywords As Names Analyze, All, Simple 637 50 Major 89 %
Scalar Are Not Arrays All, Analyze, CompatibilityPHP74, CI-checks 2 1 Minor 0 %
Should Use Coalesce Analyze, All, Simple, Suggestions, Level 3, CI-checks 42 19 Major 71 %
Use Nullable Type All, Appinfo, CompatibilityPHP53, CompatibilityPHP70, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56 126 34 Major 21 %
Avoid Using stdClass All, Analyze, OneFile, Simple, Level 4 1 1 Minor 45 %
Usort Sorting In PHP 7.0 CompatibilityPHP70, All 1 1 Major 46 %
Wrong Type For Native PHP Function All, Analyze, CI-checks 99 30 Minor 0 %
Always Anchor Regex All, Security 8 5 Major 65 %
Avoid Those Hash Functions Security, All 12 5 Major 60 %
Configure Extract All, Security 1 1 Minor 22 %
Safe Curl Options Security, All 3 1 Major 14 %
Direct Injection Security, All 13 6 Major 41 %
Encoded Simple Letters All, Security 6 4 Minor 40 %
Indirect Injection Security, All 40 10 Critical 21 %
Integer Conversion All, Security 2 2 Major 0 %
No Weak SSL Crypto All, Security 1 1 Minor 0 %
Set Cookie Safe Arguments All, Security 1 1 Major 23 %
Unserialize Second Arg Security, All 1 1 Critical 49 %
Adding Zero Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 3 3 Minor 33 %
Altering Foreach Without Reference Analyze, ClearPHP, All, Simple, Level 1, CI-checks 8 7 Major 52 %
Array_merge Needs Array Of Arrays All, Analyze 12 6 Minor 0 %
Bail Out Early All, Analyze, OneFile, Simple, Level 4 3 2 Minor 92 %
Strict Comparison With Booleans Analyze, All, Simple, Suggestions, Level 2, CI-checks 32 16 Minor 76 %
Buried Assignation Analyze, All 57 14 Minor 82 %
Cast To Boolean Analyze, OneFile, All, Simple, Level 1 10 5 Minor 55 %
Check All Types All, Analyze 16 11 Major 68 %
Check JSON All, Analyze, CI-checks 10 5 Major 64 %
Common Alternatives Analyze, All, Simple 19 11 Major 61 %
Concat Empty String All, Analyze, OneFile 1 1 Minor 0 %
Could Be Else All, Analyze 1 1 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 10 8 Major 56 %
Could Use Short Assignation Analyze, OneFile, Performances, All, Simple, CI-checks 14 9 Minor 60 %
Dangling Array References PHP recommendations, Analyze, ClearPHP, All, Simple, Level 1, Top10, CI-checks 4 3 Major 40 %
Dont Change The Blind Var All, Analyze 15 11 Minor 72 %
Dont Mix ++ All, Analyze 10 7 Minor 43 %
Don't Read And Write In One Expression All, Analyze, CompatibilityPHP73, CompatibilityPHP74 6 3 Critical 38 %
Double Assignation Analyze, All 5 4 Major 55 %
Double Object Assignation All, Analyze, ClassReview 1 1 Minor 0 %
Drop Else After Return All, Analyze, OneFile, Simple, Suggestions, Level 4, CI-checks 11 8 Minor 70 %
Echo With Concat Performances, Analyze, All, Simple, Suggestions 59 12 Minor 58 %
Else If Versus Elseif Analyze, All, Simple, php-cs-fixable, Rector, CI-checks 12 9 Minor 65 %
Empty Instructions Dead code, Analyze, All, Simple 272 9 Minor 43 %
Empty Try Catch Analyze, All, Level 3 1 1 Minor 47 %
Exit() Usage Analyze, Appinfo, OneFile, ClearPHP, All, CI-checks 22 14 Major 60 %
Switch Fallthrough All, Inventory, Security, Stats 1 1 Minor 37 %
Global Usage Analyze, Appinfo, ClearPHP, All 51 12 Minor 52 %
Htmlentities Calls Analyze, All, Simple, CI-checks 8 4 Major 39 %
Identical Consecutive Expression All, Analyze 13 3 Minor 58 %
If With Same Conditions Analyze, All, Simple, CI-checks 1 1 Major 44 %
Iffectations Analyze, All 41 15 Minor 80 %
Implied If Analyze, ClearPHP, All, Simple, CI-checks 4 1 Major 29 %
Implode() Arguments Order All, Analyze, CI-checks 3 3 Minor 0 %
Inconsistent Elseif All, Analyze 16 13 Major 73 %
Indices Are Int Or String Analyze, OneFile, All, Simple, CI-checks 3 1 Major 18 %
Infinite Recursion All, Analyze 2 2 Major 0 %
Invalid Pack Format All, Analyze, CI-checks 3 1 Major 0 %
Invalid Regex All, Analyze, CI-checks 1 1 Major 18 %
list() May Omit Variables Analyze, All, Simple, Suggestions, Level 3, CI-checks 1 1 Minor 37 %
Long Arguments All, Analyze 28 15 Minor 67 %
Max Level Of Nesting All, Analyze 16 13 Minor 0 %
Mbstring Third Arg All, Analyze, CI-checks 1 1 Minor 0 %
Mbstring Unknown Encoding All, Analyze, CI-checks 7 5 Minor 0 %
Merge If Then All, Analyze, CI-checks 29 17 Minor 0 %
Mismatched Ternary Alternatives All, Analyze, Suggestions, Level 4 3 2 Major 62 %
Mixed Concat And Interpolation All, Coding Conventions, Analyze 5 3 Minor 43 %
Modernize Empty With Expression All, Analyze, OneFile, Simple 8 4 Minor 56 %
Multiple Type Variable All, Analyze, Level 4 8 7 Minor 43 %
Multiply By One Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 1 1 Minor 17 %
Nested Ifthen Analyze, All, RadwellCodes 34 19 Major 87 %
Nested Ternary Analyze, ClearPHP, All, Simple, Level 1, CI-checks 3 1 Major 20 %
Don't Change Incomings Analyze, All 7 1 Minor 44 %
No Choice Analyze, All, Simple, Level 2, Top10, CI-checks 1 1 Major 43 %
No Direct Usage Analyze, All, Simple 2 2 Major 36 %
No Empty Regex All, Analyze, CI-checks 1 1 Critical 1 %
No Hardcoded Hash Analyze, Security, All, Simple 8 2 Critical 44 %
No Hardcoded Path Analyze, ClearPHP, All, Simple 1 1 Major 33 %
No isset() With empty() All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4, CI-checks 4 3 Minor 28 %
No Need For Else All, Analyze 20 10 Minor 74 %
No Parenthesis For Language Construct Analyze, ClearPHP, All, RadwellCodes, Simple, Suggestions, Level 2, CI-checks 49 24 Minor 61 %
Avoid Substr() One Analyze, Performances, All, CompatibilityPHP71, Simple, Level 2, Suggestions, Top10, CI-checks 23 10 Minor 57 %
Variable Is Not A Condition All, Analyze 197 47 Minor 57 %
@ Operator Appinfo, ClearPHP, All, Analyze, Performances, CI-checks 45 15 Minor 66 %
Objects Don't Need References Analyze, ClearPHP, OneFile, All, Simple, Level 2, Top10, CI-checks 23 10 Minor 31 %
include_once() Usage Analyze, Appinfo, All 49 20 Minor 73 %
Several Instructions On The Same Line Analyze, All 40 7 Major 57 %
PHP7 Dirname CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, All, Suggestions, php-cs-fixable 9 5 Minor 42 %
Print And Die Analyze, All, Simple, CI-checks 6 5 Minor 29 %
Printf Number Of Arguments All, Analyze, CI-checks 3 2 Minor 42 %
Repeated print() Analyze, All, Simple, Suggestions, Level 3, Top10, CI-checks 13 5 Major 49 %
Repeated Regex All, Analyze, Level 1, CI-checks 2 1 Minor 47 %
Return True False Analyze, All, Simple, Level 1, CI-checks 1 1 Major 53 %
Same Conditions In Condition Analyze, All, Simple, CI-checks 7 5 Critical 49 %
Should Make Ternary All, Analyze, OneFile, Simple, CI-checks 58 28 Minor 85 %
Preprocessable Analyze, All, Rector 223 40 Minor 86 %
Should Use Explode Args All, Analyze, CI-checks 1 1 Minor 0 %
Static Loop Analyze, All, Simple, Level 4 12 8 Minor 65 %
Strpos()-like Comparison Analyze, PHP recommendations, ClearPHP, All, Simple, Level 2, Top10, CI-checks 1 1 Major 54 %
Suspicious Comparison All, Analyze, Level 3 2 2 Major 15 %
Switch To Switch Analyze, All, RadwellCodes, Simple 9 7 Minor 79 %
Switch Without Default Analyze, ClearPHP, All, Simple, CI-checks 15 8 Major 68 %
Timestamp Difference Analyze, All, Simple, Level 3, CI-checks 8 6 Major 50 %
Unchecked Resources Analyze, ClearPHP, All, Simple, Level 2, CI-checks 2 2 Major 49 %
Unconditional Break In Loop All, Analyze, Level 3, CI-checks 2 1 Major 46 %
Unpreprocessed Values Analyze, OneFile, ClearPHP, All, Simple 1 1 Minor 28 %
Unreachable Code Dead code, OneFile, ClearPHP, All, Simple, Suggestions, Level 3 1 1 Major 44 %
Unsupported Types With Operators All, Analyze, CompatibilityPHP80 2 2 Minor 0 %
Use Constant PHP recommendations, All, Analyze, php-cs-fixable, CI-checks 12 9 Minor 0 %
Use Positive Condition All, Analyze, OneFile, Simple 38 21 Minor 81 %
Useless Casting All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4, CI-checks 4 2 Minor 37 %
Useless Check All, Analyze, OneFile, Simple, Level 1, CI-checks 1 1 Minor 48 %
Useless Global Analyze, OneFile, All, Simple, Level 2 6 2 Minor 24 %
Useless Instructions Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks 3 3 Minor 58 %
Useless Parenthesis Analyze, All, Simple, CI-checks 117 26 Minor 81 %
Useless Unset Analyze, OneFile, ClearPHP, All, Simple, Level 2, CI-checks 1 1 Major 28 %
No Real Comparison Analyze, All, Simple, Level 2, Top10, CI-checks 1 1 Major 22 %
One Variable String Analyze, All, RadwellCodes, Simple, CI-checks 8 4 Minor 29 %
Should Typecast Analyze, OneFile, All, Simple, CI-checks 25 12 Minor 47 %
String May Hold A Variable Analyze, All, Simple 11 4 Minor 58 %
Missing Returntype In Method All, Typehints, Analyze, CI-checks 1 1 Minor 0 %
Assigned Twice All, Analyze 138 19 Minor 78 %
Overwritten Literals Analyze, All 155 20 Major 78 %
Strange Name For Variables All, Analyze 3 2 Minor 28 %
Undefined Constant Name All, Analyze 12 4 Minor 0 %
Undefined Variable All, Analyze, CI-checks 61 10 Minor 77 %
Used Once Variables Analyze, OneFile, All, Simple, Top10 6 5 Minor 87 %
Used Once Variables (In Scope) Analyze, ClearPHP, OneFile, All, Simple, Level 4 76 33 Minor 95 %
Written Only Variables Analyze, OneFile, All, Simple 40 21 Minor 78 %