84% wc-dpd

Code Review | DPD SK for WooCommerce

WordPress plugin DPD SK for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-dpd
  • Plugin version: 4.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Oct 10, 2022
  • Latest release: Nov 10, 2023
  • Number of updates: 15
  • Update frequency: every 26.5 days
  • Top authors: webikon (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /3,983 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.08MB] [CPU: ▼2.64ms] Passed 4 tests

Analyzing server-side resources used by DPD SK for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0838.60 ▲1.65
Dashboard /wp-admin3.39 ▲0.0944.58 ▼4.82
Posts /wp-admin/edit.php3.50 ▲0.1546.11 ▲1.55
Add New Post /wp-admin/post-new.php5.97 ▲0.0882.63 ▼8.94
Media Library /wp-admin/upload.php3.31 ▲0.0837.53 ▲4.23

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 75 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by DPD SK for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.23 ▼0.111.58 ▼0.1241.58 ▼2.28
Dashboard /wp-admin2,189 ▲125.46 ▼0.1088.64 ▼8.5340.52 ▼0.57
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0637.83 ▼3.9335.69 ▼0.37
Add New Post /wp-admin/post-new.php1,526 ▼023.66 ▲0.33686.16 ▲25.6546.50 ▼7.41
Media Library /wp-admin/upload.php1,403 ▼04.16 ▼0.0698.28 ▼2.7944.17 ▲0.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-dpd/templates/chosen-parcelshop-order-data.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\ISO3166\\ISO3166DataProvider' not found in wp-content/plugins/wc-dpd/vendor/league/iso3166/src/ISO3166WithAliases.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\ISO3166\\Exception\\ISO3166Exception' not found in wp-content/plugins/wc-dpd/vendor/league/iso3166/src/Exception/OutOfBoundsException.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\ISO3166\\Exception\\ISO3166Exception' not found in wp-content/plugins/wc-dpd/vendor/league/iso3166/src/Exception/DomainException.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-dpd/templates/parcelshop-shipping-method-content.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/wc-dpd/templates/parcelshop-popup.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\ISO3166\\ISO3166DataProvider' not found in wp-content/plugins/wc-dpd/vendor/league/iso3166/src/ISO3166.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: dpd, shipping, woocommerce

wc-dpd/wc-dpd.php Passed 13 tests

"DPD SK for WooCommerce" version 4.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
79 characters long description:
DPD SK plugin for WooCommerce which exports orders to the DPD through their API

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
Everything looks great! No dangerous files found in this plugin6,424 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP408121,2215,746
PO File1129148285
JavaScript61689135
CSS733133
JSON500125

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity24.36
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity4.96
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces5
Interfaces2
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes519.23%
Methods170
▷ Static methods10260.00%
▷ Public methods16597.06%
▷ Protected methods00.00%
▷ Private methods52.94%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants92
▷ Global constants55.43%
▷ Class constants8794.57%
▷ Public constants87100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin