83% advanced-table-rate-shipping-for-woocommerce

Code Review | Advanced Table Rate Shipping for WooCommerce

WordPress plugin Advanced Table Rate Shipping for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: advanced-table-ra...
  • Plugin version: 2.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.9.2
  • WordPress version: 5.9.2
  • First release: Feb 22, 2021
  • Latest release: Mar 29, 2022
  • Number of updates: 18
  • Update frequency: every 22.9 days
  • Top authors: acowebscd (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 901 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼290.33ms] Passed 4 tests

An overview of server-side resources used by Advanced Table Rate Shipping for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.1784.80 ▲2.99
Dashboard /wp-admin3.56 ▲0.1541.36 ▼1.50
Posts /wp-admin/edit.php3.78 ▲0.1363.10 ▲11.97
Add New Post /wp-admin/post-new.php7.04 ▲0.07118.58 ▼1,160.00
Media Library /wp-admin/upload.php3.43 ▲0.1440.27 ▼2.81

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 40 new files
Database: 1 new table, no new options
New tables
wp_um_vip_users

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Table Rate Shipping for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,820 ▲6616.01 ▲0.627.78 ▼0.252.99 ▼0.56
Dashboard /wp-admin2,929 ▲536.42 ▼0.06181.97 ▼20.63198.14 ▼9.03
Posts /wp-admin/edit.php2,694 ▲93.42 ▼0.0193.28 ▲2.46170.70 ▼13.99
Add New Post /wp-admin/post-new.php1,712 ▲10221.08 ▲0.50640.75 ▼56.28217.36 ▲3.37
Media Library /wp-admin/upload.php1,699 ▲75.70 ▼0.02189.59 ▼9.81251.37 ▼28.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_um_vip_users

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/advanced-table-rate-shipping-for-woocommerce/aco-table-rate-shipping.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/advanced-table-rate-shipping-for-woocommerce/includes/class-acotrs-settingsinfo.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-table-rate-shipping-for-woocommerce/part/acotrs-settingsinfo.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/advanced-table-rate-shipping-for-woocommerce/includes/class-acotrs-shipping.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

advanced-table-rate-shipping-for-woocommerce/aco-table-rate-shipping.php 85% from 13 tests

The main file in "Advanced Table Rate Shipping for WooCommerce" v. 2.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-table-rate-shipping-for-woocommerce.php" instead of "aco-table-rate-shipping.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 262 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,246 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP116357141,782
PO File1153163323
SVG1820116
CSS116016
JSON2007
JavaScript2012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity52.75
▷ Minimum class complexity1.00
▷ Maximum class complexity211.00
Average method complexity5.68
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods78
▷ Static methods33.85%
▷ Public methods7292.31%
▷ Protected methods00.00%
▷ Private methods67.69%
Functions15
▷ Named functions746.67%
▷ Anonymous functions853.33%
Constants13
▷ Global constants646.15%
▷ Class constants753.85%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.15MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/banner-772x250.png149.32KB56.63KB▼ 62.07%