84% woocommerce-myparcel

Code Review | MyParcel

WordPress plugin MyParcel scored84%from 54 tests.

About plugin

Code review

54 tests

User reviews

40 reviews

Install metrics

10,000+ active /306,642 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.45MB] [CPU: ▼0.78ms] Passed 4 tests

An overview of server-side resources used by MyParcel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4447.79 ▲0.20
Dashboard /wp-admin3.80 ▲0.4949.60 ▼2.49
Posts /wp-admin/edit.php3.85 ▲0.4950.42 ▼1.79
Add New Post /wp-admin/post-new.php6.32 ▲0.4393.00 ▲0.96
Media Library /wp-admin/upload.php3.67 ▲0.4345.47 ▲7.22

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for MyParcel
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.33 ▼0.301.86 ▲0.0844.14 ▲2.08
Dashboard /wp-admin2,201 ▲245.60 ▼0.0188.39 ▼4.9642.71 ▲2.21
Posts /wp-admin/edit.php2,106 ▲61.95 ▼0.0435.95 ▲0.0839.69 ▲2.43
Add New Post /wp-admin/post-new.php1,532 ▼523.27 ▲5.25674.33 ▲37.2656.79 ▼18.22
Media Library /wp-admin/upload.php1,409 ▲94.22 ▲0.10101.57 ▲4.8742.79 ▼0.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • myparcel_notice_persisted
    • woocommerce_myparcel_version
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 79× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MyParcelNL\\Sdk\\src\\Model\\BaseModel' not found in wp-content/plugins/woocommerce-myparcel/vendor/myparcelnl/sdk/src/Model/Account/Account.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'MyParcelNL\\Sdk\\src\\Validator\\AbstractValidator' not found in wp-content/plugins/woocommerce-myparcel/vendor/myparcelnl/sdk/src/Validator/Consignment/DHLParcelConnectConsignmentValidator.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'MyParcelNL\\Sdk\\src\\Model\\Carrier\\AbstractCarrier' not found in wp-content/plugins/woocommerce-myparcel/vendor/myparcelnl/sdk/src/Model/Carrier/CarrierDHLEuroplus.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'MyParcelNL\\Sdk\\src\\Services\\Web\\AbstractWebService' not found in wp-content/plugins/woocommerce-myparcel/vendor/myparcelnl/sdk/src/Services/Web/Webhook/AbstractWebhookWebService.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'MyParcelNL\\Sdk\\src\\Model\\BaseModel' not found in wp-content/plugins/woocommerce-myparcel/vendor/myparcelnl/sdk/src/Model/Fulfilment/Product.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'MyParcelNL\\Sdk\\src\\Rule\\Rule' not found in wp-content/plugins/woocommerce-myparcel/vendor/myparcelnl/sdk/src/Rule/Consignment/RestrictCountriesRule.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'MyParcelNL\\Sdk\\src\\Model\\Carrier\\AbstractCarrier' not found in wp-content/plugins/woocommerce-myparcel/vendor/myparcelnl/sdk/src/Model/Carrier/CarrierDHLForYou.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'MyParcelNL\\Sdk\\src\\Support\\Collection' not found in wp-content/plugins/woocommerce-myparcel/vendor/myparcelnl/sdk/src/Collection/Fulfilment/OrderCollection.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'MyParcelNL\\Sdk\\src\\Services\\Web\\AbstractWebService' not found in wp-content/plugins/woocommerce-myparcel/vendor/myparcelnl/sdk/src/Services/Web/AccountWebService.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'MyParcelNL\\Sdk\\src\\Model\\Recipient' not found in wp-content/plugins/woocommerce-myparcel/includes/adapter/RecipientFromWCOrder.php:16

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

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === woocommerce-myparcel === )
You can look at the official readme.txt

woocommerce-myparcel/woocommerce-myparcel.php Passed 13 tests

The entry point to "MyParcel" version 4.21.0 is a PHP file that has certain tags in its header comment area
118 characters long description:
Export your WooCommerce orders to MyParcel (https://myparcel.nl/) and print labels directly from the WooCommerce admin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected35,018 lines of code in 279 files:
LanguageFilesBlank linesComment linesLines of code
PHP2184,93910,90221,114
PO File93,50109,015
XML13003,496
CSS98850661
YAML11450302
Markdown31520167
JSON410159
SVG60196
JavaScript60108

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces48
Interfaces2
Traits10
Classes191
▷ Abstract classes147.33%
▷ Concrete classes17792.67%
▷ Final classes00.00%
Methods1,673
▷ Static methods27416.38%
▷ Public methods1,31878.78%
▷ Protected methods794.72%
▷ Private methods27616.50%
Functions85
▷ Named functions11.18%
▷ Anonymous functions8498.82%
Constants419
▷ Global constants30.72%
▷ Class constants41699.28%
▷ Public constants35785.82%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin