84% simple-table-rates-shipping-for-woocommerce

Code Review | Simple Table Rates Shipping For WooCommerce

WordPress plugin Simple Table Rates Shipping For WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: simple-table-rate...
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 24, 2022
  • Latest release: Aug 12, 2023
  • Number of updates: 17
  • Update frequency: every 19.0 days
  • Top authors: waseem_senjer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 466 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.00ms] Passed 4 tests

This is a short check of server-side resources used by Simple Table Rates Shipping For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.84 ▼5.47
Dashboard /wp-admin3.31 ▲0.0144.96 ▼2.30
Posts /wp-admin/edit.php3.36 ▲0.0048.76 ▲0.73
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.53 ▼6.75
Media Library /wp-admin/upload.php3.23 ▲0.0030.61 ▼1.48

Server storage [IO: ▲0.17MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Simple Table Rates Shipping For WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.61 ▼1.021.78 ▼0.2643.20 ▲0.74
Dashboard /wp-admin2,206 ▲185.91 ▲0.00106.67 ▼0.9440.38 ▼4.51
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0240.99 ▲0.8336.38 ▼0.61
Add New Post /wp-admin/post-new.php1,534 ▲2023.28 ▲5.77597.99 ▼54.2855.95 ▼5.39
Media Library /wp-admin/upload.php1,391 ▼04.17 ▼0.0599.93 ▼4.1441.73 ▼4.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-table-rates-shipping-for-woocommerce/core/app/frontend/views/app.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WPRuby_Str\\Core\\Rules\\Abstract_Rule' not found in wp-content/plugins/simple-table-rates-shipping-for-woocommerce/core/rules/class-quantity-rule.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'WPRuby_Str\\Core\\Rules\\Interface_Rule' not found in wp-content/plugins/simple-table-rates-shipping-for-woocommerce/core/rules/class-abstract-rule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WPRuby_Str\\Core\\Rules\\Abstract_Rule' not found in wp-content/plugins/simple-table-rates-shipping-for-woocommerce/core/rules/class-product-rule.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-table-rates-shipping-for-woocommerce/core/views/admin-options.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/simple-table-rates-shipping-for-woocommerce/core/class-simple-table-rates-shipping-method.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WPRuby_Str\\Core\\Rules\\Abstract_Rule' not found in wp-content/plugins/simple-table-rates-shipping-for-woocommerce/core/rules/class-weight-rule.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPRuby_Str\\Core\\Rules\\Abstract_Rule' not found in wp-content/plugins/simple-table-rates-shipping-for-woocommerce/core/rules/class-cart-total-rule.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPRuby_Str\\Core\\Rules\\Abstract_Rule' not found in wp-content/plugins/simple-table-rates-shipping-for-woocommerce/core/rules/class-volume-rule.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPRuby_Str\\Core\\App\\Endpoints\\Abstract_Endpoint' not found in wp-content/plugins/simple-table-rates-shipping-for-woocommerce/core/app/endpoints/class-find-product-endpoint.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: shipping, woocommerce, table rates

simple-table-rates-shipping-for-woocommerce/simple-table-rates.php 85% from 13 tests

This is the main PHP file of "Simple Table Rates Shipping For WooCommerce" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-table-rates-shipping-for-woocommerce.php" instead of "simple-table-rates.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected943 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP23306237939
JavaScript10113
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.10
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes19
▷ Abstract classes210.53%
▷ Concrete classes1789.47%
▷ Final classes00.00%
Methods88
▷ Static methods89.09%
▷ Public methods7281.82%
▷ Protected methods66.82%
▷ Private methods1011.36%
Functions7
▷ Named functions00.00%
▷ Anonymous functions7100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin