84% dhlpwc

Code Review | DHL eCommerce for WooCommerce

WordPress plugin DHL eCommerce for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: dhlpwc
  • Plugin version: 2.0.17
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.16-6.2
  • WordPress version: 6.3.1
  • First release: Mar 3, 2022
  • Latest release: Nov 13, 2023
  • Number of updates: 29
  • Update frequency: every 21.5 days
  • Top authors: shindhl (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /26,523 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by DHL eCommerce for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.04 ▼7.58
Dashboard /wp-admin3.33 ▼0.0246.46 ▼15.38
Posts /wp-admin/edit.php3.38 ▲0.0247.98 ▲0.27
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.68 ▲2.50
Media Library /wp-admin/upload.php3.25 ▲0.0135.24 ▼1.99

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for DHL eCommerce for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.21 ▼0.141.86 ▲0.1941.99 ▼2.52
Dashboard /wp-admin2,198 ▲215.60 ▲0.0490.80 ▼9.5039.98 ▼3.17
Posts /wp-admin/edit.php2,100 ▼01.96 ▲0.0042.55 ▲5.3935.20 ▲2.81
Add New Post /wp-admin/post-new.php1,526 ▼923.25 ▲4.91696.86 ▲82.0750.82 ▼16.36
Media Library /wp-admin/upload.php1,403 ▼04.16 ▼0.0799.75 ▼2.7541.98 ▲1.95

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/dhlpwc/includes/view/admin/multi-select.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt is a good inspiration

dhlpwc/dhlpwoocommerce.php 92% from 13 tests

The primary PHP file in "DHL eCommerce for WooCommerce" version 2.0.17 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dhlpwc.php" instead of "dhlpwoocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected15,121 lines of code in 180 files:
LanguageFilesBlank linesComment linesLines of code
PHP1372,38066510,304
PO File29151,3941,997
JavaScript13371991,514
CSS515210877
Markdown1600338
SVG221091

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity19.19
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes84
▷ Abstract classes55.95%
▷ Concrete classes7994.05%
▷ Final classes00.00%
Methods436
▷ Static methods10.23%
▷ Public methods31271.56%
▷ Protected methods12428.44%
▷ Private methods00.00%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.00%
Constants135
▷ Global constants75.19%
▷ Class constants12894.81%
▷ Public constants128100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/dhlpwc_sprites.png8.53KB3.96KB▼ 53.61%
assets/images/dhlpwc_logo_mini.png0.86KB1.07KB0.00%
assets/images/dhlpwc_logo.png3.64KB2.51KB▼ 31.10%