89% woo-product-shipping-table

Code Review | Woocommerce Product Shipping Table Rates

WordPress plugin Woocommerce Product Shipping Table Rates scored89%from 54 tests.

About plugin

  • Plugin page: woo-product-shipp...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-5.3
  • WordPress version: 6.3.1
  • First release: Oct 25, 2017
  • Latest release: Jan 24, 2020
  • Number of updates: 35
  • Update frequency: every 23.5 days
  • Top authors: phoeniixx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,256 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼12.49MB] [CPU: ▼2,617,214.04ms] Passed 4 tests

A check of server-side resources used by Woocommerce Product Shipping Table Rates
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1544.94 ▼4.42
Dashboard /wp-admin3.50 ▼50.4255.58 ▼10,468,832.07
Posts /wp-admin/edit.php3.61 ▲0.2151.35 ▼2.46
Add New Post /wp-admin/post-new.php6.08 ▲0.1588.22 ▼17.22
Media Library /wp-admin/upload.php3.42 ▲0.1539.03 ▼1.26

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce Product Shipping Table Rates
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.101.99 ▲0.3944.34 ▼0.87
Dashboard /wp-admin2,195 ▲185.61 ▲0.0886.31 ▼19.1738.85 ▼6.59
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0836.34 ▲1.1536.74 ▲0.93
Add New Post /wp-admin/post-new.php1,535 ▲918.72 ▼4.33621.20 ▼55.9169.71 ▼5.08
Media Library /wp-admin/upload.php1,403 ▲34.31 ▲0.1696.03 ▼9.6140.66 ▼5.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt is a good inspiration

woo-product-shipping-table/main.php 69% from 13 tests

"Woocommerce Product Shipping Table Rates" version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 740 characters long)
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "2.6.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-product-shipping-table.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin5,997 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,1952764,485
PHP227569886
CSS4920626

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity104.00
▷ Minimum class complexity104.00
▷ Maximum class complexity104.00
Average method complexity8.36
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin