83% multiparcels-shipping-for-woocommerce

Code Review | MultiParcels Shipping For WooCommerce

WordPress plugin MultiParcels Shipping For WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: multiparcels-ship...
  • Plugin version: 1.16.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.2.2
  • WordPress version: 6.3.1
  • First release: May 4, 2018
  • Latest release: Sep 19, 2023
  • Number of updates: 599
  • Update frequency: every 3.3 days
  • Top authors: multiparcels (73.79%)domasweb (26.38%)

Code review

54 tests

User reviews

59 reviews

Install metrics

3,000+ active /56,604 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.81ms] Passed 4 tests

Server-side resources used by MultiParcels Shipping For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.19 ▲1.28
Dashboard /wp-admin3.31 ▲0.0144.48 ▼6.02
Posts /wp-admin/edit.php3.36 ▲0.0148.41 ▲1.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.60 ▼19.60
Media Library /wp-admin/upload.php3.24 ▲0.0135.70 ▲2.37

Server storage [IO: ▲1.81MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 140 new files
Database: 4 new tables, 6 new options
New tables
wp_multiparcels_carrier_selections
wp_multiparcels_terminals
wp_multiparcels_shipping_shipments
wp_multiparcels_shippings
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for MultiParcels Shipping For WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.22 ▼1.224.32 ▲2.5338.79 ▼5.82
Dashboard /wp-admin2,221 ▲304.84 ▼0.03105.61 ▲2.1339.24 ▼4.67
Posts /wp-admin/edit.php2,101 ▲121.97 ▼0.0639.73 ▲6.4536.35 ▲3.48
Add New Post /wp-admin/post-new.php1,531 ▲323.16 ▲4.70667.92 ▲61.1359.56 ▲11.81
Media Library /wp-admin/upload.php1,403 ▲124.24 ▲0.01101.08 ▼0.7242.37 ▼3.16

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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
Please fix the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/multiparcels-shipping-for-woocommerce/woocommerce/emails/email-selected-pickup-location.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/multiparcels-shipping-for-woocommerce/woocommerce/admin/amazing-shipping.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/multiparcels-shipping-for-woocommerce/woocommerce/order/order-details-after-customer-v2.php:5
    • > PHP Notice
      Undefined variable: all_done in wp-content/plugins/multiparcels-shipping-for-woocommerce/woocommerce/order/mass-shipping.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/multiparcels-shipping-for-woocommerce/woocommerce/order/mass-shipping.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/multiparcels-shipping-for-woocommerce/woocommerce/order/order-details-after-customer-v3.php:3

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Screenshots: Screenshot #6 (Email preview) image not found
Please take inspiration from this readme.txt

multiparcels-shipping-for-woocommerce/multiparcels-shipping-for-woocommerce.php 92% from 13 tests

The main file in "MultiParcels Shipping For WooCommerce" v. 1.16.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected10,651 lines of code in 86 files:
LanguageFilesBlank linesComment linesLines of code
PHP787,5241,1339,172
PO File1393506900
JavaScript38920376
CSS217095
SVG10193
Markdown16015

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity16.56
▷ Minimum class complexity1.00
▷ Maximum class complexity306.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes71
▷ Abstract classes68.45%
▷ Concrete classes6591.55%
▷ Final classes00.00%
Methods354
▷ Static methods277.63%
▷ Public methods30887.01%
▷ Protected methods10.28%
▷ Private methods4512.71%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants125
▷ Global constants00.00%
▷ Class constants125100.00%
▷ Public constants125100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
48 PNG files occupy 1.18MB with 0.71MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/carriers/db_schenker.png9.98KB2.94KB▼ 70.54%
public/images/boxes/extra-small.png11.51KB3.76KB▼ 67.34%
public/images/carriers/siuntos_autobusais.png19.73KB4.50KB▼ 77.19%
public/images/carriers/post_de.png5.32KB3.14KB▼ 41.05%
public/images/shipping_methods/hands_to_bus_station.png6.96KB3.83KB▼ 45.04%