10% innozilla-table-rate-shipping-for-woocommerce

Code Review | Innozilla Table Rate Shipping for WooCommerce

WordPress plugin Innozilla Table Rate Shipping for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: innozilla-table-r...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 16, 2020
  • Latest release: Oct 4, 2023
  • Number of updates: 63
  • Update frequency: every 18.7 days
  • Top authors: innozilla (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /3,853 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/innozilla-table-rate-shipping-for-woocommerce/installer.php+41
    Use of undefined constant WC_VERSION - assumed 'WC_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.58ms] Passed 4 tests

A check of server-side resources used by Innozilla Table Rate Shipping for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.59 ▼5.09
Dashboard /wp-admin3.37 ▲0.0649.34 ▼2.12
Posts /wp-admin/edit.php3.48 ▲0.1247.10 ▼5.10
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.34 ▼18.00
Media Library /wp-admin/upload.php3.29 ▲0.0639.29 ▲4.79

Server storage [IO: ▲0.16MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: 4 new tables, 7 new options
New tables
wp_woocommerce_shipping_zone_shipping_methods
wp_woocommerce_shipping_zones
wp_innozilla_woocommerce_shipping_table_rates
wp_woocommerce_shipping_zone_locations
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
hide_table_rate_welcome_notice

Browser metrics Passed 4 tests

An overview of browser requirements for Innozilla Table Rate Shipping for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9114.50 ▲0.252.13 ▲0.2048.96 ▲6.01
Dashboard /wp-admin2,212 ▲215.83 ▲0.97109.38 ▲6.7240.31 ▲2.00
Posts /wp-admin/edit.php2,097 ▲112.02 ▼0.1236.35 ▼1.1434.95 ▲2.66
Add New Post /wp-admin/post-new.php1,545 ▲723.29 ▼0.06681.03 ▲78.9661.79 ▲8.16
Media Library /wp-admin/upload.php1,397 ▲124.24 ▲0.02101.39 ▼0.5151.38 ▲5.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 4 tables in the database
    • wp_woocommerce_shipping_zone_shipping_methods
    • wp_woocommerce_shipping_zones
    • wp_woocommerce_shipping_zone_locations
    • wp_innozilla_woocommerce_shipping_table_rates
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • hide_table_rate_welcome_notice
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/innozilla-table-rate-shipping-for-woocommerce/includes/legacy/shipping-zones/includes/views/html-zone-methods.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/innozilla-table-rate-shipping-for-woocommerce/innozilla-table-rate-shipping-woocommerce.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/innozilla-table-rate-shipping-for-woocommerce/includes/legacy/shipping-zones/includes/views/html-zone-method-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/innozilla-table-rate-shipping-for-woocommerce/includes/legacy/shipping-zones/includes/views/form-edit-shipping-zone.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/innozilla-table-rate-shipping-for-woocommerce/includes/legacy/shipping-zones/includes/views/html-zone-list.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/innozilla-table-rate-shipping-for-woocommerce/classes/Setup.php on line 5
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/innozilla-table-rate-shipping-for-woocommerce/classes/Setup.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/innozilla-table-rate-shipping-for-woocommerce/includes/legacy/shipping-zones/includes/views/form-add-shipping-zone.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/innozilla-table-rate-shipping-for-woocommerce/classes/Setup.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ITRSW_FREE_Exception' not found in wp-content/plugins/innozilla-table-rate-shipping-for-woocommerce/classes/exceptions/Missing_Dependencies_Exception.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: shipping, table rate shipping, woocommerce table rate shipping, woocommerce, woocommerce shipping

innozilla-table-rate-shipping-for-woocommerce/innozilla-table-rate-shipping-woocommerce.php 77% from 13 tests

This is the main PHP file of "Innozilla Table Rate Shipping for WooCommerce" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("innozilla-table-rate-shipping-for-woocommerce.php" instead of "innozilla-table-rate-shipping-woocommerce.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected3,226 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP265626002,635
JavaScript3426266
CSS2162195
LESS130130

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 105)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity21.50
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity105.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods99
▷ Static methods1919.19%
▷ Public methods8686.87%
▷ Protected methods00.00%
▷ Private methods1313.13%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants981.82%
▷ Class constants218.18%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin