78% pakkelabels-for-woocommerce

Code Review | Shipmondo - A complete shipping solution for WooCommerce

WordPress plugin Shipmondo - A complete shipping solution for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: pakkelabels-for-w...
  • Plugin version: 4.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.2-6.3
  • WordPress version: 6.3.1
  • First release: Sep 5, 2016
  • Latest release: Aug 22, 2023
  • Number of updates: 193
  • Update frequency: every 13.2 days
  • Top authors: pakkelabels (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

7,000+ active /110,285 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼2.69ms] Passed 4 tests

A check of server-side resources used by Shipmondo - A complete shipping solution for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0149.41 ▲8.07
Dashboard /wp-admin3.32 ▲0.0150.23 ▼0.68
Posts /wp-admin/edit.php3.37 ▲0.0148.28 ▼5.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.98 ▼8.65
Media Library /wp-admin/upload.php3.24 ▲0.0135.44 ▲3.65

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 64 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Shipmondo - A complete shipping solution for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.081.81 ▲0.1142.28 ▼0.12
Dashboard /wp-admin2,195 ▲215.51 ▼0.0284.29 ▼13.4640.02 ▼0.81
Posts /wp-admin/edit.php2,103 ▲31.95 ▼0.0740.61 ▲1.1237.80 ▼1.41
Add New Post /wp-admin/post-new.php1,535 ▲918.27 ▼4.97652.05 ▲6.2469.18 ▲14.40
Media Library /wp-admin/upload.php1,394 ▼64.19 ▼0.0399.23 ▼7.0043.41 ▲0.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/pakkelabels-for-woocommerce/templates/service-point-selection/dropdown/content.php
    • > /wp-content/plugins/pakkelabels-for-woocommerce/templates/admin/admin-notice.php
    • > /wp-content/plugins/pakkelabels-for-woocommerce/templates/settings/fields/select.php
    • > /wp-content/plugins/pakkelabels-for-woocommerce/templates/settings/fields/text.php
    • > /wp-content/plugins/pakkelabels-for-woocommerce/templates/service-point-selection/modal/partials/close-button.php
    • > /wp-content/plugins/pakkelabels-for-woocommerce/templates/service-point-selection/dropdown/error.php
  • 30× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/pakkelabels-for-woocommerce/templates/settings/fields/select.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'ShipmondoForWooCommerce\\Lib\\Abstracts\\Controller' not found in wp-content/plugins/pakkelabels-for-woocommerce/plugin/controllers/controller.business.php:6
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/pakkelabels-for-woocommerce/templates/settings/fields/select.php on line 3
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/pakkelabels-for-woocommerce/templates/settings/fields/select.php on line 3
    • > PHP Fatal error
      Trait 'ShipmondoForWooCommerce\\Lib\\Traits\\Translate' not found in wp-content/plugins/pakkelabels-for-woocommerce/lib/abstracts/abstract.project.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/pakkelabels-for-woocommerce/plugin/shipping-methods/class.shipmondo.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ShipmondoForWooCommerce\\Lib\\Abstracts\\Controller' not found in wp-content/plugins/pakkelabels-for-woocommerce/plugin/controllers/controller.settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ShipmondoForWooCommerce\\Lib\\Abstracts\\Controller' not found in wp-content/plugins/pakkelabels-for-woocommerce/plugin/controllers/controller.shipping-methods.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ShipmondoForWooCommerce\\Lib\\Abstracts\\Controller' not found in wp-content/plugins/pakkelabels-for-woocommerce/plugin/controllers/controller.dibs-easy-compatibility.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ShipmondoForWooCommerce\\Plugin\\Plugin' not found in wp-content/plugins/pakkelabels-for-woocommerce/templates/service-point-selection/modal/content.php:2

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 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

pakkelabels-for-woocommerce/pakkelabels.php 92% from 13 tests

The main PHP file in "Shipmondo - A complete shipping solution for WooCommerce" ver. 4.2.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pakkelabels-for-woocommerce.php" instead of "pakkelabels.php")

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
No dangerous file extensions were detected4,293 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP436619422,728
JavaScript214562731
CSS21020564
PO File1101198270

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity15.59
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces8
Interfaces0
Traits9
Classes20
▷ Abstract classes210.00%
▷ Concrete classes1890.00%
▷ Final classes00.00%
Methods207
▷ Static methods12459.90%
▷ Public methods15072.46%
▷ Protected methods3014.49%
▷ Private methods2713.04%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.85MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png11.71KB6.38KB▼ 45.48%
assets/icon-256x256.png40.39KB21.51KB▼ 46.75%
images/picker_green.png5.63KB2.45KB▼ 56.60%
assets/banner-1544x500.png393.71KB142.55KB▼ 63.79%
images/picker_default.png5.30KB2.15KB▼ 59.48%