-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs-error-codes.json
More file actions
130 lines (114 loc) · 10.5 KB
/
phpcs-error-codes.json
File metadata and controls
130 lines (114 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{
"WordPress.Security.EscapeOutput.OutputNotEscaped": "Output not properly escaped",
"WordPress.Security.NonceVerification.Missing": "Processing form data without nonce verification",
"WordPress.Security.NonceVerification.Recommended": "Nonce verification recommended",
"WordPress.Security.ValidatedSanitizedInput.InputNotSanitized": "User input not sanitized",
"WordPress.Security.ValidatedSanitizedInput.InputNotValidated": "User input not validated",
"WordPress.Security.ValidatedSanitizedInput.MissingUnslash": "Missing wp_unslash() for user input",
"WordPress.Security.SafeRedirect.wp_redirect_wp_redirect": "Use wp_safe_redirect() instead of wp_redirect()",
"WordPress.Security.PluginMenuSlug.Using__FILE__": "Plugin menu slug should not use __FILE__",
"WordPress.DB.DirectDatabaseQuery.DirectQuery": "Direct database query - use WP functions instead",
"WordPress.DB.DirectDatabaseQuery.NoCaching": "Direct database call without caching",
"WordPress.DB.DirectDatabaseQuery.SchemaChange": "Database schema change detected",
"WordPress.DB.PreparedSQL.NotPrepared": "SQL query not properly prepared",
"WordPress.DB.PreparedSQL.InterpolatedNotPrepared": "SQL query uses interpolation without prepare",
"WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare": "Unfinished prepared statement",
"WordPress.DB.PreparedSQLPlaceholders.UnsupportedPlaceholder": "Unsupported placeholder in prepared statement",
"WordPress.DB.PreparedSQLPlaceholders.UnescapedLiteral": "Unescaped literal in prepared statement",
"WordPress.DB.RestrictedClasses.mysql__mysql": "Use wpdb instead of mysql_* functions",
"WordPress.DB.RestrictedFunctions.mysql_mysql_query": "Use wpdb instead of mysql_query()",
"WordPress.WP.AlternativeFunctions.curl_curl_init": "Use wp_remote_* functions instead of cURL",
"WordPress.WP.AlternativeFunctions.curl_curl_close": "Use wp_remote_* functions instead of cURL",
"WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents": "Use wp_remote_get() instead of file_get_contents()",
"WordPress.WP.AlternativeFunctions.file_system_read_fopen": "Use WP_Filesystem instead of fopen()",
"WordPress.WP.AlternativeFunctions.file_system_read_fclose": "Use WP_Filesystem instead of fclose()",
"WordPress.WP.AlternativeFunctions.file_system_read_fwrite": "Use WP_Filesystem instead of fwrite()",
"WordPress.WP.AlternativeFunctions.json_encode_json_encode": "Use wp_json_encode() instead of json_encode()",
"WordPress.WP.AlternativeFunctions.parse_url_parse_url": "Use wp_parse_url() instead of parse_url()",
"WordPress.WP.AlternativeFunctions.rand_mt_rand": "Use wp_rand() instead of mt_rand()",
"WordPress.WP.AlternativeFunctions.rand_rand": "Use wp_rand() instead of rand()",
"WordPress.WP.AlternativeFunctions.strip_tags_strip_tags": "Use wp_strip_all_tags() instead of strip_tags()",
"WordPress.WP.CapitalPDangit.Misspelled": "WordPress should be capitalized correctly",
"WordPress.WP.CronInterval.CronSchedulesInterval": "Cron interval too short",
"WordPress.WP.DeprecatedClasses.wp_user_searchFound": "Deprecated class wp_user_search",
"WordPress.WP.DeprecatedFunctions.get_linksFound": "Deprecated function get_links()",
"WordPress.WP.DeprecatedFunctions.wp_get_linksFound": "Deprecated function wp_get_links()",
"WordPress.WP.DeprecatedParameters.Like_escapeFound": "Deprecated parameter like_escape",
"WordPress.WP.DiscouragedConstants.Deprecated": "Using deprecated WordPress constants",
"WordPress.WP.DiscouragedFunctions.Deprecated": "Using deprecated WordPress functions",
"WordPress.WP.EnqueuedResources.NonEnqueuedScript": "Script not properly enqueued",
"WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet": "Stylesheet not properly enqueued",
"WordPress.WP.EnqueuedResourceParameters.MissingVersion": "Missing version parameter in enqueue",
"WordPress.WP.EnqueuedResourceParameters.NotInFooter": "Script should be loaded in footer",
"WordPress.WP.GlobalVariablesOverride.Prohibited": "Overriding WordPress global variables",
"WordPress.WP.PostsPerPage.posts_per_page_posts_per_page": "posts_per_page should not be set to -1",
"WordPress.WP.TimezoneChange.timezone_change_date_default_timezone_set": "Don't use date_default_timezone_set()",
"WordPress.PHP.DevelopmentFunctions.error_log_error_log": "error_log() found - debug code",
"WordPress.PHP.DevelopmentFunctions.error_log_print_r": "print_r() found - debug code",
"WordPress.PHP.DevelopmentFunctions.error_log_var_dump": "var_dump() found - debug code",
"WordPress.PHP.DevelopmentFunctions.error_log_var_export": "var_export() found - debug code",
"WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure_error_reporting": "error_reporting() can lead to path disclosure",
"WordPress.PHP.DiscouragedPHPFunctions.Discouraged": "Using discouraged PHP functions",
"WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_ini_set": "Don't use ini_set()",
"WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_putenv": "Don't use putenv()",
"WordPress.PHP.DiscouragedPHPFunctions.system_calls_exec": "Don't use exec()",
"WordPress.PHP.DiscouragedPHPFunctions.system_calls_shell_exec": "Don't use shell_exec()",
"WordPress.PHP.DiscouragedPHPFunctions.system_calls_system": "Don't use system()",
"WordPress.PHP.IniSet.Risky": "Risky use of ini_set()",
"WordPress.PHP.NoSilencedErrors.Discouraged": "Error suppression operator @ is discouraged",
"WordPress.PHP.PregQuoteDelimiter.Missing": "Missing delimiter in preg_quote()",
"WordPress.PHP.RestrictedPHPFunctions.create_function_create_function": "Don't use create_function()",
"WordPress.PHP.StrictComparisons.LooseComparison": "Use strict comparison operators",
"WordPress.PHP.StrictInArray.MissingTrueStrict": "Use strict parameter in in_array()",
"WordPress.PHP.YodaConditions.NotYoda": "Use Yoda conditions",
"WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound": "Global constant without proper prefix",
"WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound": "Global function without proper prefix",
"WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound": "Global variable without proper prefix",
"WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound": "Global class without proper prefix",
"WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound": "Hook name without proper prefix",
"WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound": "Dynamic hook name without proper prefix",
"WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid": "Method name doesn't follow conventions",
"WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase": "Variable not in snake_case",
"WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase": "Property not in snake_case",
"WordPress.NamingConventions.ValidHookName.UseUnderscores": "Hook name should use underscores",
"WordPress.Files.FileName.InvalidClassFileName": "Class file name doesn't follow conventions",
"WordPress.Files.FileName.NotHyphenatedLowercase": "File name should be hyphenated lowercase",
"WordPress.CodeAnalysis.AssignmentInCondition.Found": "Assignment found in conditional statement",
"WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition": "Assignment in while condition",
"WordPress.CodeAnalysis.EmptyStatement.DetectedCatch": "Empty catch statement",
"WordPress.CodeAnalysis.EmptyStatement.DetectedIf": "Empty if statement",
"WordPress.DateTime.CurrentTimeTimestamp.Requested": "Use current_time() instead of time()",
"WordPress.DateTime.RestrictedFunctions.date_date": "Use wp_date() instead of date()",
"WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set": "Don't change timezone",
"WordPress.WP.I18n.MissingTranslatorsComment": "Missing translator comment",
"WordPress.WP.I18n.NonSingularStringLiteralText": "Non-singular string literal in translation",
"WordPress.WP.I18n.NonSingularStringLiteralDomain": "Non-singular string literal domain",
"WordPress.WP.I18n.NonSingularStringLiteralContext": "Non-singular string literal context",
"WordPress.WP.I18n.NoEmptyStrings": "Empty string in translation function",
"WordPress.WP.I18n.MissingSingularPlaceholder": "Missing singular placeholder",
"WordPress.WP.I18n.MissingPluralPlaceholder": "Missing plural placeholder",
"WordPress.WP.I18n.UnorderedPlaceholders": "Unordered placeholders in translation",
"WordPress.WP.I18n.MixedOrderedPlaceholders": "Mixed ordered placeholders",
"WordPress.WP.I18n.NoHtmlWrappedStrings": "Translatable string wrapped in HTML",
"WordPress.WP.I18n.LowMinimumArgs": "Too few arguments in translation function",
"WordPress.WP.I18n.TooManyFunctionArgs": "Too many arguments in translation function",
"WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener": "No space after array opener",
"WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser": "No space before array closer",
"WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys": "Spaces around array keys",
"WordPress.Arrays.CommaAfterArrayItem.NoComma": "Missing comma after array item",
"WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned": "Array arrows not aligned",
"WordPress.Classes.ClassInstantiation.MissingParenthesis": "Missing parenthesis in class instantiation",
"WordPress.WhiteSpace.CastStructureSpacing.NoSpaceBeforeOpenParenthesis": "No space before cast parenthesis",
"WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis": "No space after control structure parenthesis",
"WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis": "No space before close parenthesis",
"WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore": "No space before operator",
"WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter": "No space after operator",
"WordPress.Utils.I18nTextDomainFixer.MissingTextDomain": "Missing text domain",
"WordPress.Utils.I18nTextDomainFixer.IncorrectTextDomain": "Incorrect text domain",
"PluginCheck.CodeAnalysis.EnqueuedResourceOffDomain": "Enqueued resource from external domain",
"PluginCheck.Security.DirectDB.UnescapedDBParameter": "Unescaped parameter in database query",
"Squiz.PHP.DiscouragedFunctions.Discouraged": "Using discouraged PHP functions",
"Squiz.PHP.Eval.Discouraged": "Use of eval() is discouraged",
"WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude": "Using exclusionary parameters in WP_Query",
"WordPressVIPMinimum.Performance.FetchingRemoteData.FileGetContentsUnknown": "Using file_get_contents() for remote data"
}