Current Path : /storage/v11800/shoptimizer-latest/public_html/wp-content/plugins/banner-management-for-woocommerce/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/shoptimizer-latest/public_html/wp-content/plugins/banner-management-for-woocommerce/ruleset.xml |
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="WordPress VIP Minimum" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>WordPress VIP Minimum Coding Standards</description>
<config name="minimum_supported_wp_version" value="4.9"/>
<rule ref="Generic.PHP.Syntax"/>
<rule ref="Generic.PHP.NoSilencedErrors">
<properties>
<property name="error" value="true"/>
</properties>
</rule>
<rule ref="WordPressVIPMinimum.Security.Twig">
<include-pattern>*.twig</include-pattern>
</rule>
<rule ref="WordPress.Security.EscapeOutput"/>
<rule ref="WordPress.Security.NonceVerification"/>
<rule ref="WordPress.Security.ValidatedSanitizedInput">
<exclude name="WordPress.Security.ValidatedSanitizedInput.MissingUnslash"/>
</rule>
<rule ref="WordPress.Security.PluginMenuSlug"/>
<rule ref="WordPress.PHP.IniSet"/>
<rule ref="WordPress.WP.EnqueuedResources"/>
<rule ref="WordPress.WP.PostsPerPage"/>
<rule ref="WordPress.DateTime.RestrictedFunctions"/>
<rule ref="WordPress.DB.PreparedSQL"/>
<rule ref="WordPress.DB.DirectDatabaseQuery"/>
<rule ref="WordPress.DB.SlowDBQuery"/>
<rule ref="WordPress.WP.GlobalVariablesOverride"/>
<rule ref="WordPress.PHP.StrictComparisons"/>
<rule ref="WordPress.CodeAnalysis.AssignmentInCondition"/>
<rule ref="WordPress.PHP.StrictInArray"/>
<rule ref="WordPress.PHP.DontExtract"/>
<rule ref="WordPress.WP.CronInterval">
<properties>
<!-- Set to 900 (15 minutes), which is the requirement for the VIP platform. -->
<property name="min_interval" value="900"/>
</properties>
</rule>
<rule ref="Generic.VersionControl.GitMergeConflict"/>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<!-- Covers rule: Omitting the closing PHP tag at the end of a file is preferred. -->
<rule ref="PSR2.Files.ClosingTag"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines"/>
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine"/>
<include-pattern>*.php</include-pattern>
<include-pattern>*.inc</include-pattern>
<exclude-pattern>*.js</exclude-pattern>
<exclude-pattern>*.css</exclude-pattern>
</rule>
<rule ref="Squiz.PHP.CommentedOutCode"/>
<!-- https://docs.wpvip.com/technical-references/code-review/#eval-and-create_function -->
<rule ref="Squiz.PHP.Eval.Discouraged">
<type>error</type>
<message>`eval()` is a security risk, please refrain from using it.</message>
</rule>
<!-- https://docs.wpvip.com/technical-references/code-review/#settings-alteration -->
<rule ref="WordPress.PHP.DiscouragedPHPFunctions">
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/pull/633#issuecomment-266634811 -->
<properties>
<property name="exclude" type="array">
<element value="obfuscation"/>
</property>
</properties>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_error_reporting">
<type>error</type>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_ini_restore">
<type>error</type>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_apache_setenv">
<type>error</type>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_putenv">
<type>error</type>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_set_include_path">
<type>error</type>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_restore_include_path">
<type>error</type>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_magic_quotes_runtime">
<type>error</type>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_set_magic_quotes_runtime">
<type>error</type>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_dl">
<type>error</type>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.system_calls_exec">
<type>error</type>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.system_calls_shell_exec">
<type>error</type>
</rule>
<!-- https://docs.wpvip.com/technical-references/code-review/#commented-out-code-debug-code-or-output -->
<rule ref="WordPress.PHP.DevelopmentFunctions">
<!-- This is already covered in WordPress.PHP.DiscouragedPHPFunctions sniff -->
<exclude name="WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure_error_reporting"/>
</rule>
<!-- https://docs.wpvip.com/technical-references/code-review/#settings-alteration -->
<rule ref="WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure_phpinfo">
<type>error</type>
</rule>
<rule ref="WordPress.PHP.DevelopmentFunctions.error_log_error_log">
<type>error</type>
</rule>
<!-- https://docs.wpvip.com/technical-references/code-review/#use-wp_json_encode-over-json_encode -->
<!-- hhttps://docs.wpvip.com/technical-references/code-review/vip-errors/#h-filesystem-operations -->
<!-- https://docs.wpvip.com/technical-references/code-review/vip-warnings/#h-remote-calls -->
<rule ref="WordPress.WP.AlternativeFunctions">
<!-- This is already covered in WordPressVIPMinimum.Performance.FetchingRemoteData.FileGetContentsUnknown -->
<exclude name="WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents"/>
<!-- This is already covered in WordPressVIPMinimum.Functions.StripTags.StripTagsOneParameter -->
<exclude name="WordPress.WP.AlternativeFunctions.strip_tags_strip_tags"/>
<!-- This is already covered in WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_fwrite -->
<exclude name="WordPress.WP.AlternativeFunctions.file_system_read_fwrite"/>
<!-- This is already covered in WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_file_put_contents -->
<exclude name="WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents"/>
</rule>
<!-- VIP recommends other functions -->
<rule ref="WordPress.WP.AlternativeFunctions.curl_curl_init">
<message>Using cURL functions is highly discouraged within VIP context. Please see: https://docs.wpvip.com/technical-references/code-quality-and-best-practices/retrieving-remote-data/.</message>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.curl_curl_close">
<message>Using cURL functions is highly discouraged within VIP context. Please see: https://docs.wpvip.com/technical-references/code-quality-and-best-practices/retrieving-remote-data/.</message>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.curl_curl_getinfo">
<message>Using cURL functions is highly discouraged within VIP context. Please see: https://docs.wpvip.com/technical-references/code-quality-and-best-practices/retrieving-remote-data/.</message>
</rule>
<rule ref="WordPressVIPMinimum.Functions.RestrictedFunctions.get_posts_get_children">
<type>error</type>
<message>`%1$s()` performs a no-LIMIT query by default, make sure to set a reasonable `posts_per_page`. `%1$s()` will do a -1 query by default, a maximum of 100 should be used.</message>
</rule>
<!-- Include VariableAnalysis checks -->
<rule ref="VariableAnalysis"/>
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
<rule ref="WordPressVIPMinimum.Variables.VariableAnalysis.DeprecatedSniff">
<severity>0</severity>
</rule>
<!-- Prevent duplicate messages from deprecated sniff. -->
<rule ref="WordPressVIPMinimum.Variables.VariableAnalysis.VariableRedeclaration">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Variables.VariableAnalysis.UndefinedVariable">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Variables.VariableAnalysis.UnusedVariable">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Variables.VariableAnalysis.SelfInsideClosure">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Variables.VariableAnalysis.SelfOutsideClass">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Variables.VariableAnalysis.StaticInsideClosure">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Variables.VariableAnalysis.StaticOutsideClass">
<severity>0</severity>
</rule>
</ruleset>