88% dhl-ecommerce-apac

Code Review | DHL Ecommerce APAC

WordPress plugin DHL Ecommerce APAC scored88%from 54 tests.

About plugin

  • Plugin page: dhl-ecommerce-apac
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2023
  • Latest release: Oct 19, 2023
  • Number of updates: 32
  • Update frequency: every 6.6 days
  • Top authors: dhlecommerceasia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /778 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.06ms] Passed 4 tests

Analyzing server-side resources used by DHL Ecommerce APAC
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.47 ▼9.88
Dashboard /wp-admin3.31 ▼0.0350.46 ▼11.92
Posts /wp-admin/edit.php3.42 ▲0.0752.48 ▲0.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.84 ▼10.64
Media Library /wp-admin/upload.php3.23 ▲0.0134.63 ▲0.50

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for DHL Ecommerce APAC
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.25 ▲0.021.77 ▲0.0143.43 ▼5.19
Dashboard /wp-admin2,201 ▲245.53 ▼0.1085.85 ▼12.8938.05 ▼2.72
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0240.53 ▼2.7536.91 ▼0.90
Add New Post /wp-admin/post-new.php1,532 ▲623.12 ▼0.49663.26 ▲17.5667.55 ▲15.31
Media Library /wp-admin/upload.php1,406 ▲94.18 ▼0.0294.60 ▼8.6343.50 ▼0.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (13 tag instead of maximum 10)
  • Donate link: Invalid URI found ("#")
  • Screenshots: Please add images for these screenshots: #1 (Here, you can configure your account details.), #2 (You can add your Pickup account and set defaults here.), #3 (From here, you can create labels for orders as well as edit and cancel labels.)
You can look at the official readme.txt

dhl-ecommerce-apac/dhl-ecommerce-apac.php 92% from 13 tests

The entry point to "DHL Ecommerce APAC" version 1.1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.7" instead of "3.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin10,565 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,4823,4187,158
PHP98355243,151
CSS1389196
SVG10060

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 147)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity56.00
▷ Minimum class complexity2.00
▷ Maximum class complexity161.00
Average method complexity9.37
▷ Minimum method complexity1.00
▷ Maximum method complexity147.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods46
▷ Static methods12.17%
▷ Public methods4291.30%
▷ Protected methods00.00%
▷ Private methods48.70%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.52MB with 0.37MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png113.88KB31.44KB▼ 72.40%
screenshot-4.png89.10KB25.65KB▼ 71.22%
screenshot-3.png190.72KB49.52KB▼ 74.04%
screenshot-2.png136.07KB38.74KB▼ 71.53%