79% woo-shipping-display-mode

Code Review | Shipping Method Display Style for WooCommerce

WordPress plugin Shipping Method Display Style for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: woo-shipping-disp...
  • Plugin version: 3.7.8
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Feb 8, 2016
  • Latest release: Nov 3, 2023
  • Number of updates: 212
  • Update frequency: every 13.4 days
  • Top authors: dots (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

4,000+ active /69,704 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.56MB] [CPU: ▲1.27ms] 75% from 4 tests

This is a short check of server-side resources used by Shipping Method Display Style for WooCommerce
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,626.35ms on /wp-admin/admin.php?page=woo-shipping-display-mode)
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6236.40 ▼0.98
Dashboard /wp-admin3.93 ▲0.6249.10 ▼5.81
Posts /wp-admin/edit.php3.98 ▲0.6250.82 ▲5.35
Add New Post /wp-admin/post-new.php6.45 ▲0.56108.67 ▲13.29
Media Library /wp-admin/upload.php3.69 ▲0.4637.38 ▲6.50
Shipping Method Display Style for WooCommerce /wp-admin/admin.php?page=woo-shipping-display-mode3.931,626.35
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius4.0138.29

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 214 new files
Database: no new tables, 9 new options
New WordPress options
fs_debug_mode
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
fs_active_plugins
fs_accounts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Shipping Method Display Style for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15313.43 ▼1.308.48 ▲6.7629.63 ▼15.64
Dashboard /wp-admin2,212 ▲315.61 ▼0.0991.60 ▼23.1747.93 ▲4.84
Posts /wp-admin/edit.php2,121 ▲211.99 ▼0.0241.81 ▲6.8440.64 ▲4.57
Add New Post /wp-admin/post-new.php1,531 ▲523.55 ▲0.50582.86 ▼71.5952.94 ▼0.55
Media Library /wp-admin/upload.php1,417 ▲204.17 ▼0.0496.87 ▼7.7046.19 ▼0.41
Shipping Method Display Style for WooCommerce /wp-admin/admin.php?page=woo-shipping-display-mode9821.6528.9753.55
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,0691.6923.9227.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/woo-shipping-display-mode/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-posts
    • fs_active_plugins
    • can_compress_scripts
    • fs_accounts
    • fs_debug_mode
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

woo-shipping-display-mode/woo-shipping-display-mode.php 92% from 13 tests

The main PHP script in "Shipping Method Display Style for WooCommerce" version 3.7.8 is automatically included on every request by WordPress
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "4.5")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin35,113 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
PHP1328,24517,96834,030
PO File5195258763
JavaScript53686211
CSS1554109

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity75.39
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes60
▷ Abstract classes23.33%
▷ Concrete classes5896.67%
▷ Final classes00.00%
Methods1,319
▷ Static methods20115.24%
▷ Public methods91569.37%
▷ Protected methods171.29%
▷ Private methods38729.34%
Functions107
▷ Named functions10699.07%
▷ Anonymous functions10.93%
Constants146
▷ Global constants9967.81%
▷ Class constants4732.19%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.11MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/help.png0.30KB0.32KB0.00%
admin/images/rate-us.png8.46KB8.06KB▼ 4.69%
admin/images/icon-128x128.png5.99KB3.11KB▼ 48.10%
freemius/assets/img/woo-shipping-display-mode.png8.32KB4.41KB▼ 47.08%
admin/images/woo-shipping-display-mode.png66.85KB3.86KB▼ 94.22%