79% livemesh-weight-based-shipping

Code Review | Weight Based Shipping For WooCommerce

WordPress plugin Weight Based Shipping For WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: livemesh-weight-b...
  • Plugin version: 1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2022
  • Latest release: Jul 17, 2023
  • Number of updates: 22
  • Update frequency: every 22.7 days
  • Top authors: livemesh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,138 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.98MB] [CPU: ▲25.20ms] Passed 4 tests

A check of server-side resources used by Weight Based Shipping For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /8.88 ▲5.4267.92 ▲26.11
Dashboard /wp-admin8.90 ▲5.5975.92 ▲27.94
Posts /wp-admin/edit.php8.90 ▲5.5478.43 ▲30.08
Add New Post /wp-admin/post-new.php9.25 ▲3.36105.92 ▲16.68
Media Library /wp-admin/upload.php8.90 ▲5.6764.89 ▲30.36
Weight Based Shipping For WooCommerce /wp-admin/admin.php?page=livemesh-weight-based-shipping8.9061.95
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9058.88

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 261 new files
Database: no new tables, 9 new options
New WordPress options
fs_debug_mode
db_upgraded
widget_theysaidso_widget
can_compress_scripts
fs_accounts
widget_recent-posts
fs_active_plugins
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Weight Based Shipping For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7513.23 ▼1.061.73 ▼0.1032.38 ▼10.83
Dashboard /wp-admin2,227 ▲395.86 ▲0.97109.32 ▼4.9546.56 ▲3.38
Posts /wp-admin/edit.php2,113 ▲242.01 ▼0.0133.82 ▼2.4636.21 ▲1.03
Add New Post /wp-admin/post-new.php1,523 ▲923.07 ▲5.53638.78 ▼10.4765.95 ▲3.70
Media Library /wp-admin/upload.php1,412 ▲304.26 ▲0.0795.27 ▼1.7444.83 ▼0.55
Weight Based Shipping For WooCommerce /wp-admin/admin.php?page=livemesh-weight-based-shipping1,0021.7227.9458.36
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0652.0824.4828.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/livemesh-weight-based-shipping/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • fs_accounts
    • theysaidso_admin_options
    • fs_active_plugins
    • fs_debug_mode
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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 just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: weight based shipping, woocommerce, woocommerce shipping, table rate shipping, conditional shipping

livemesh-weight-based-shipping/livemesh-weight-based-shipping.php 69% from 13 tests

The principal PHP file in "Weight Based Shipping For WooCommerce" v. 1.4 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Requires at least: The required version number must match the one declared in readme.txt ("5.5" instead of "5.2")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin38,539 lines of code in 211 files:
LanguageFilesBlank linesComment linesLines of code
PHP1799,20817,79636,326
CSS172315576
PO File1229332537
Sass2857478
JavaScript99484406
Markdown1680214
SVG2002

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity47.41
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes100
▷ Abstract classes44.00%
▷ Concrete classes9696.00%
▷ Final classes11.04%
Methods1,488
▷ Static methods19813.31%
▷ Public methods1,09073.25%
▷ Protected methods181.21%
▷ Private methods38025.54%
Functions111
▷ Named functions111100.00%
▷ Anonymous functions00.00%
Constants154
▷ Global constants10769.48%
▷ Class constants4730.52%
▷ 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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%