MindblownHQ / wooping-shop-health

The WooCommerce Shop Health plugin by Wooping
https://wooping.io
2 stars 1 forks source link

Open Plugin Check Warnings & Errors + PHPCS #7

Open mklasen opened 1 week ago

mklasen commented 1 week ago

Todo:


FILE: shop-health.php
+------+--------+---------+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+------+
| line | column | type    | code                            | message                                                                                                                                     | docs |
+------+--------+---------+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+------+
| 0    | 0      | ERROR   | plugin_header_restricted_fields | Restricted plugin header field(s) found: 'GitHub Plugin URI'                                                                                |      |
| 0    | 0      | WARNING | trademarked_term                | The plugin name includes a restricted term. Your chosen plugin name - "Wooping Shop Health" - contains the restricted term "woo" which cann |      |
|      |        |         |                                 | ot be used at all in your plugin name.                                                                                                      |      |
| 0    | 0      | WARNING | trademarked_term                | The plugin slug includes a restricted term. Your plugin slug - "wooping-shop-health" - contains the restricted term "woo" which cannot be u |      |
|      |        |         |                                 | sed at all in your plugin slug.                                                                                                             |      |
+------+--------+---------+---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+------+

FILE: /Users/marinusklasen/Developer/MindBlownHQ/Wooping/shop-health/templates/dashboard-page.php
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| line | column | type  | code                                                                                | message                                                                                   | docs |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| 64   | 47     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$message'.                                          |      |
| 64   | 71     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'add_query_arg'.                                     |      |
| 71   | 33     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '__'.                                                |      |
| 89   | 65     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'SHOPHEALTH_DOCUMENTATION_URL'.                      |      |
| 141  | 49     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'sh_get_route'.                                      |      |
| 166  | 49     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'sh_get_route'.                                      |      |
| 186  | 65     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'get_edit_post_link'.                                |      |
| 186  | 137    | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'get_the_title'.                                     |      |
| 187  | 61     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$issue'.                                            |      |
| 193  | 50     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'sh_get_route'.                                      |      |
| 208  | 56     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$issue'.                                            |      |
| 212  | 76     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'sh_get_route'.                                      |      |
| 222  | 39     | ERROR | WordPress.Security.EscapeOutput.UnsafePrintingFunction                              | All output should be run through an escaping function (like esc_html_e() or esc_attr_e()) |      |
|      |        |       |                                                                                     | , found '_e'.                                                                             |      |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+

FILE: /Users/marinusklasen/Developer/MindBlownHQ/Wooping/shop-health/templates/settings-page.php
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| line | column | type  | code                                                                                | message                                                                                   | docs |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| 3    | 44     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'sh_get_route'.                                      |      |
| 4    | 20     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'sh_nonce_field'.                                    |      |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+

FILE: /Users/marinusklasen/Developer/MindBlownHQ/Wooping/shop-health/templates/general-issues.php
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| line | column | type  | code                                                                                | message                                                                                   | docs |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| 8    | 49     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '__'.                                                |      |
| 15   | 48     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$issue'.                                            |      |
| 21   | 72     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$issue'.                                            |      |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+

FILE: /Users/marinusklasen/Developer/MindBlownHQ/Wooping/shop-health/templates/product-issues.php
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| line | column | type  | code                                                                                | message                                                                                   | docs |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| 32   | 72     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'get_the_title'.                                     |      |
| 33   | 53     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'get_edit_post_link'.                                |      |
| 49   | 37     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$issue_count'.                                      |      |
| 50   | 37     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$issue_text'.                                       |      |
| 68   | 70     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '__'.                                                |      |
| 71   | 72     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$issue'.                                            |      |
| 77   | 84     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$issue'.                                            |      |
| 98   | 79     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$i'.                                                |      |
| 101  | 44     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$url'.                                              |      |
| 101  | 83     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$i'.                                                |      |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+

FILE: /Users/marinusklasen/Developer/MindBlownHQ/Wooping/shop-health/templates/components/settings_tabs.php
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| line | column | type  | code                                                                                | message                                                                                   | docs |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| 3    | 29     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'sh_get_route'.                                      |      |
| 8    | 24     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '__'.                                                |      |
| 10   | 29     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'sh_get_route'.                                      |      |
| 15   | 24     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '__'.                                                |      |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+

FILE: /Users/marinusklasen/Developer/MindBlownHQ/Wooping/shop-health/templates/components/statistics.php
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| line | column | type  | code                                                                                | message                                                                                   | docs |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| 16   | 18     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$icon'.                                             |      |
| 23   | 18     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found 'get_woocommerce_currency_symbol'.                   |      |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+

FILE: /Users/marinusklasen/Developer/MindBlownHQ/Wooping/shop-health/templates/components/donut-chart.php
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| line | column | type  | code                                                                                | message                                                                                   | docs |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| 10   | 69     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$success'.                                          |      |
| 10   | 115    | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$warning'.                                          |      |
| 12   | 59     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$success'.                                          |      |
| 18   | 17     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '_n'.                                                |      |
| 24   | 17     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$issues_count'.                                     |      |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+

FILE: /Users/marinusklasen/Developer/MindBlownHQ/Wooping/shop-health/templates/components/scan-progress.php
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| line | column | type  | code                                                                                | message                                                                                   | docs |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| 3    | 20     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '__'.                                                |      |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+

FILE: /Users/marinusklasen/Developer/MindBlownHQ/Wooping/shop-health/templates/metaboxes/product-issues.php
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| line | column | type  | code                                                                                | message                                                                                   | docs |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+
| 15   | 42     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '__'.                                                |      |
| 18   | 72     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$issue'.                                            |      |
| 24   | 56     | ERROR | WordPress.Security.EscapeOutput.OutputNotEscaped                                    | All output should be run through an escaping function (see the Security sections in the W |      |
|      |        |       |                                                                                     | ordPress Developer Handbooks), found '$issue'.                                            |      |
+------+--------+-------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+------+

FILE: /Users/marinusklasen/Developer/MindBlownHQ/Wooping/shop-health/src/Contracts/Schema.php
+------+--------+---------+----------------------------------------------+---------------------------------------------------------------------------------------------------------------------+------+
| line | column | type    | code                                         | message                                                                                                             | docs |
+------+--------+---------+----------------------------------------------+---------------------------------------------------------------------------------------------------------------------+------+
| 46   | 9      | WARNING | WordPress.DB.DirectDatabaseQuery.NoCaching   | Direct database call without caching detected. Consider using wp_cache_get() / wp_cache_set() or wp_cache_delete(). |      |
| 46   | 9      | WARNING | WordPress.DB.DirectDatabaseQuery.DirectQuery | Use of a direct database call is discouraged.                                                                       |      |
| 46   | 17     | ERROR   | WordPress.DB.PreparedSQL.NotPrepared         | Use placeholders and $wpdb->prepare(); found $query                                                                 |      |
+------+--------+---------+----------------------------------------------+---------------------------------------------------------------------------------------------------------------------+------+

FILE: readme.txt
+------+--------+---------+---------------------+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------+
| line | column | type    | code                | message                                                                     | docs                                                                             |
+------+--------+---------+---------------------+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------+
| 0    | 0      | ERROR   | stable_tag_mismatch | Mismatched Stable Tag: 1.0 != 0.9. The Stable Tag in your readme file does  | https://developer.wordpress.org/plugins/wordpress-org/common-issues/#incorrect-s |
|      |        |         |                     | not match the version in your main plugin file. Your Stable Tag is meant to | table-tag                                                                        |
|      |        |         |                     |  be the stable version of your plugin, not of WordPress. For your plugin to |                                                                                  |
|      |        |         |                     |  be properly downloaded from WordPress.org, those values need to be the sam |                                                                                  |
|      |        |         |                     | e. If they're out of sync, your users won't get the right version of your c |                                                                                  |
|      |        |         |                     | ode.                                                                        |                                                                                  |
| 0    | 0      | WARNING | trademarked_term    | The plugin name includes a restricted term. Your chosen plugin name - "Woop |                                                                                  |
|      |        |         |                     | ing Shop Health" - contains the restricted term "woo" which cannot be used  |                                                                                  |
|      |        |         |                     | at all in your plugin name.                                                 |                                                                                  |
+------+--------+---------+---------------------+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------+

FILE: /Users/marinusklasen/Developer/MindBlownHQ/Wooping/shop-health/src/Models/Database/Options.php
+------+--------+---------+----------------------------------------------+---------------------------------------------------------------------------------------------------------------------+------+
| line | column | type    | code                                         | message                                                                                                             | docs |
+------+--------+---------+----------------------------------------------+---------------------------------------------------------------------------------------------------------------------+------+
| 27   | 20     | WARNING | WordPress.DB.DirectDatabaseQuery.DirectQuery | Use of a direct database call is discouraged.                                                                       |      |
| 27   | 20     | WARNING | WordPress.DB.DirectDatabaseQuery.NoCaching   | Direct database call without caching detected. Consider using wp_cache_get() / wp_cache_set() or wp_cache_delete(). |      |
+------+--------+---------+----------------------------------------------+---------------------------------------------------------------------------------------------------------------------+------+
lucprincen commented 1 week ago

I believe most of this has been done in the CS PR from today (right @YourMark ?).

for now i'm bumping this to improved release