84% woocommerce-easy-table-rate-shipping

Code Review | Table Rate Shipping for WooCommerce

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

About plugin

  • Plugin page: woocommerce-easy-...
  • Plugin version: 2.28
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: May 21, 2015
  • Latest release: Aug 10, 2023
  • Number of updates: 62
  • Update frequency: every 48.4 days
  • Top authors: merlinmonmouth (72.58%)WebFactory (29.03%)

Code review

54 tests

User reviews

69 reviews

Install metrics

10,000+ active /240,454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.47ms] Passed 4 tests

An overview of server-side resources used by Table Rate Shipping for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.84 ▼1.96
Dashboard /wp-admin3.31 ▲0.0157.06 ▲3.46
Posts /wp-admin/edit.php3.43 ▲0.0748.89 ▼1.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.47 ▼24.71
Media Library /wp-admin/upload.php3.23 ▲0.0136.00 ▲2.15

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Table Rate Shipping for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲6113.65 ▼0.571.95 ▼0.1643.33 ▼0.26
Dashboard /wp-admin2,231 ▲284.91 ▼0.94106.88 ▼13.2042.05 ▼5.18
Posts /wp-admin/edit.php2,107 ▲72.06 ▲0.0335.39 ▼3.6532.88 ▼2.99
Add New Post /wp-admin/post-new.php1,533 ▲223.50 ▲0.28615.55 ▼66.9954.04 ▼4.79
Media Library /wp-admin/upload.php1,407 ▲74.29 ▲0.0999.15 ▼6.1642.75 ▼6.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woocommerce-easy-table-rate-shipping/woocommerce-table-rate-plugin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% 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
10 plugin tags: table rate shipping, shipping by weight, woocommerce shipping, conditional shipping, woocommerce tiered shipping...

woocommerce-easy-table-rate-shipping/woocommerce-table-rate-plugin.php 92% from 13 tests

This is the main PHP file of "Table Rate Shipping for WooCommerce" version 2.28, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-easy-table-rate-shipping.php" instead of "woocommerce-table-rate-plugin.php")

Code Analysis Passed 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
No dangerous file extensions were detected1,551 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22773171,475
CSS17068
JavaScript1208

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity116.00
▷ Minimum class complexity116.00
▷ Maximum class complexity116.00
Average method complexity6.48
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/email.png0.51KB0.59KB0.00%
images/lock.png0.45KB0.45KB▼ 1.08%
images/name.png0.64KB0.57KB▼ 11.33%
images/green.png0.16KB0.24KB0.00%