73% shipping-manager-for-woocommerce

Code Review | Shipping Manager For WooCommerce

WordPress plugin Shipping Manager For WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: shipping-manager-...
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 11, 2020
  • Latest release: Sep 21, 2023
  • Number of updates: 66
  • Update frequency: every 15.8 days
  • Top authors: arabianmido (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,891 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.53MB] [CPU: ▼1.53ms] Passed 4 tests

Server-side resources used by Shipping Manager For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5937.47 ▼7.85
Dashboard /wp-admin3.90 ▲0.5950.35 ▲2.97
Posts /wp-admin/edit.php3.95 ▲0.5945.75 ▲3.56
Add New Post /wp-admin/post-new.php6.41 ▲0.5394.74 ▼4.79
Media Library /wp-admin/upload.php3.66 ▲0.4339.28 ▲3.62
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.0236.83

Server storage [IO: ▲3.26MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 193 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
fs_active_plugins
theysaidso_admin_options
fs_accounts
widget_recent-posts
fs_debug_mode

Browser metrics Passed 4 tests

Shipping Manager For WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.53 ▼0.201.74 ▲0.1329.13 ▼18.13
Dashboard /wp-admin2,228 ▲485.51 ▼0.1381.19 ▼7.6840.31 ▼3.34
Posts /wp-admin/edit.php2,134 ▲341.97 ▲0.0235.31 ▼0.2034.52 ▼2.35
Add New Post /wp-admin/post-new.php1,553 ▲2518.54 ▼4.50605.02 ▼37.6262.29 ▼1.38
Media Library /wp-admin/upload.php1,436 ▲334.19 ▲0.0397.10 ▼1.4344.67 ▲1.72
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0881.6924.1726.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/shipping-manager-for-woocommerce/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • fs_accounts
    • fs_active_plugins
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • fs_debug_mode
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× 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/shipping-manager-for-woocommerce/inc/wcsm-functions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shipping-manager-for-woocommerce/inc/wcsm-admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention: You can look at the official readme.txt

shipping-manager-for-woocommerce/shipping-manager-for-wooCommerce.php 85% from 13 tests

Analyzing the main PHP file in "Shipping Manager For WooCommerce" version 1.4.0
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 152 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shipping-manager-for-woocommerce.php" instead of "shipping-manager-for-wooCommerce.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected37,287 lines of code in 144 files:
LanguageFilesBlank linesComment linesLines of code
PHP1218,05317,22733,538
JavaScript65954362,830
CSS1511524632
Markdown1680214
PO File1242673

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity89.84
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes24.00%
▷ Concrete classes4896.00%
▷ Final classes00.00%
Methods1,271
▷ Static methods19815.58%
▷ Public methods88269.39%
▷ Protected methods171.34%
▷ Private methods37229.27%
Functions107
▷ Named functions107100.00%
▷ Anonymous functions00.00%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/select2.png0.51KB0.99KB0.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/img/add-icon.png0.85KB0.80KB▼ 5.07%
assets/img/remove-icon.png0.33KB0.42KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%