84% wc-tiered-shipping

Code Review | WC Tiered Shipping

WordPress plugin WC Tiered Shipping scored84%from 54 tests.

About plugin

  • Plugin page: wc-tiered-shipping
  • Plugin version: 3.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 20, 2014
  • Latest release: Jul 25, 2023
  • Number of updates: 28
  • Update frequency: every 120.8 days
  • Top authors: thatdevgirl (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active /3,963 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by WC Tiered Shipping
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.58 ▲0.21
Dashboard /wp-admin3.31 ▲0.0044.87 ▼6.09
Posts /wp-admin/edit.php3.36 ▲0.0049.13 ▲1.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.44 ▼6.41
Media Library /wp-admin/upload.php3.23 ▲0.0032.93 ▼0.67

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WC Tiered Shipping
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.26 ▼1.121.68 ▼0.2844.32 ▼0.88
Dashboard /wp-admin2,209 ▲245.90 ▼0.15110.28 ▼4.6741.38 ▼3.77
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0339.86 ▲3.0735.26 ▼1.22
Add New Post /wp-admin/post-new.php1,514 ▼1917.54 ▼5.63673.14 ▲14.2163.68 ▲12.05
Media Library /wp-admin/upload.php1,385 ▼04.31 ▲0.0696.70 ▲0.5243.59 ▲3.45

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wc-tiered-shipping/inc/add.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ThreePM\\WCTieredShipping\\add_action() in wp-content/plugins/wc-tiered-shipping/inc/set-assets.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ThreePM\\WCTieredShipping\\is_admin() in wp-content/plugins/wc-tiered-shipping/inc/plugins-page.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-tiered-shipping/inc/init.php:226
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ThreePM\\WCTieredShipping\\add_action() in wp-content/plugins/wc-tiered-shipping/inc/activate.php:11

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: woocommerce, flat rate, shipping

wc-tiered-shipping/wc-tiered-shipping.php Passed 13 tests

The main PHP file in "WC Tiered Shipping" ver. 3.1.1 adds more information about the plugin and also serves as the entry point for this plugin
89 characters long description:
This WordPress plugin adds a tiered flat rate shipping option for the WooCommerce plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin260 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP679114213
JavaScript2142047

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.25
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin