10% wuunder-for-woocommerce

Code Review | Wuunder Shipping Module

WordPress plugin Wuunder Shipping Module scored10%from 54 tests.

About plugin

  • Plugin page: wuunder-for-wooco...
  • Plugin version: 2.7.25
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 6.3.1
  • First release: Nov 5, 2019
  • Latest release: Nov 24, 2022
  • Number of updates: 55
  • Update frequency: every 20.6 days
  • Top authors: wuunder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,016 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory

Server metrics [RAM: ▼1.92MB] [CPU: ▼61.52ms] Passed 4 tests

A check of server-side resources used by Wuunder Shipping Module
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.21 ▼40.30
Dashboard /wp-admin2.10 ▼1.256.88 ▼61.44
Posts /wp-admin/edit.php2.10 ▼1.266.61 ▼44.32
Add New Post /wp-admin/post-new.php2.10 ▼3.795.61 ▼100.03
Media Library /wp-admin/upload.php2.10 ▼1.136.25 ▼28.39

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

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

Browser metrics Passed 4 tests

Wuunder Shipping Module: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.34 ▼0.011.79 ▼0.0942.52 ▼5.04
Dashboard /wp-admin2,198 ▲215.61 ▲0.0086.71 ▼3.2238.97 ▼5.02
Posts /wp-admin/edit.php2,103 ▲62.03 ▲0.0239.58 ▲2.3036.38 ▲0.22
Add New Post /wp-admin/post-new.php1,536 ▲818.03 ▼5.07622.33 ▼37.8259.66 ▼6.32
Media Library /wp-admin/upload.php1,403 ▼04.19 ▲0.02103.66 ▲0.0443.95 ▲0.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

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
  • 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Wuunder\\Api\\Config\\Config' not found in wp-content/plugins/wuunder-for-woocommerce/vendor/wuunder/connector-php/src/Wuunder/Api/Config/BookingConfig.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Wuunder\\Model\\Model' not found in wp-content/plugins/wuunder-for-woocommerce/vendor/wuunder/connector-php/src/Wuunder/Model/ParcelshopModel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Wuunder\\Api\\ApiResponse' not found in wp-content/plugins/wuunder-for-woocommerce/vendor/wuunder/connector-php/src/Wuunder/Api/ParcelshopApiResponse.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Wuunder\\Api\\ApiResponse' not found in wp-content/plugins/wuunder-for-woocommerce/vendor/wuunder/connector-php/src/Wuunder/Api/ShipmentApiResponse.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Wuunder\\Http\\Request' not found in wp-content/plugins/wuunder-for-woocommerce/vendor/wuunder/connector-php/src/Wuunder/Http/GetRequest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Wuunder\\Model\\Model' not found in wp-content/plugins/wuunder-for-woocommerce/vendor/wuunder/connector-php/src/Wuunder/Model/ParcelshopsModel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Wuunder\\Model\\Model' not found in wp-content/plugins/wuunder-for-woocommerce/vendor/wuunder/connector-php/src/Wuunder/Model/ShipmentModel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Wuunder\\Api\\ApiResponse' not found in wp-content/plugins/wuunder-for-woocommerce/vendor/wuunder/connector-php/src/Wuunder/Api/BookingApiResponse.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Wuunder\\Api\\Config\\Config' not found in wp-content/plugins/wuunder-for-woocommerce/vendor/wuunder/connector-php/src/Wuunder/Api/Config/ParcelshopsConfig.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Wuunder\\Api\\Config\\Config' not found in wp-content/plugins/wuunder-for-woocommerce/vendor/wuunder/connector-php/src/Wuunder/Api/Config/ShipmentConfig.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

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

The main PHP file in "Wuunder Shipping Module" ver. 2.7.25 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: It is recommended to name the main PHP file as the plugin slug ("wuunder-for-woocommerce.php" instead of "woocommerce-wuunder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin3,775 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP496265822,918
Markdown32100358
PO File54959163
JavaScript1273146
JSON300123
CSS471040
SVG10127

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity6.56
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes39
▷ Abstract classes25.13%
▷ Concrete classes3794.87%
▷ Final classes00.00%
Methods167
▷ Static methods2213.17%
▷ Public methods15089.82%
▷ Protected methods31.80%
▷ Private methods148.38%
Functions21
▷ Named functions1990.48%
▷ Anonymous functions29.52%
Constants9
▷ Global constants666.67%
▷ Class constants333.33%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
22 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/retour-download-icon.png2.57KB0.95KB▼ 63.13%
assets/images/parcelshop/search.png3.05KB2.10KB▼ 31.13%
assets/images/parcelshop/POSTNL-locator.png3.56KB2.20KB▼ 38.15%
assets/images/shipping-icon.png1.79KB0.95KB▼ 47.10%
assets/images/retour-in-transit.png3.03KB1.23KB▼ 59.61%