10% automated-dhl-parcel-shipping-labels

Code Review | Automated DHL Parcel shipping labels

WordPress plugin Automated DHL Parcel shipping labels scored10%from 54 tests.

About plugin

  • Plugin page: automated-dhl-par...
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-6.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2021
  • Latest release: Jun 26, 2023
  • Number of updates: 12
  • Update frequency: every 58.6 days
  • Top authors: hitstacks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /721 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Error in wp-content/plugins/automated-dhl-parcel-shipping-labels/hitshipo_dhlp.php+32
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/automated-dhl-parcel-shipping-labels/hitshipo_dhlp.php:32
    Stack trace:
    #0 wp-includes/class-wp-hook.php(312): hit_woo_dhlp_plugin_activation()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(720): do_action()

Server metrics [RAM: ▲0.40MB] [CPU: ▼3.68ms] Passed 4 tests

This is a short check of server-side resources used by Automated DHL Parcel shipping labels
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4038.87 ▼2.76
Dashboard /wp-admin3.70 ▲0.4047.00 ▼6.66
Posts /wp-admin/edit.php3.75 ▲0.4047.84 ▲0.06
Add New Post /wp-admin/post-new.php6.28 ▲0.4084.27 ▼5.35
Media Library /wp-admin/upload.php3.63 ▲0.4033.59 ▲0.29

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Automated DHL Parcel shipping labels: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.50 ▼0.784.71 ▲2.7941.10 ▼7.93
Dashboard /wp-admin2,206 ▲214.84 ▼1.04109.92 ▼5.0341.11 ▼1.97
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0241.98 ▲2.6837.64 ▲2.35
Add New Post /wp-admin/post-new.php1,542 ▲918.52 ▼4.72635.62 ▼36.6254.81 ▲0.17
Media Library /wp-admin/upload.php1,391 ▲94.18 ▼0.1297.42 ▼0.5542.73 ▲0.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WeightPackStrategy' not found in wp-content/plugins/automated-dhl-parcel-shipping-labels/controllors/classes/weight_pack/class-hit-weight-strategy-simple.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'WeightPackStrategy' not found in wp-content/plugins/automated-dhl-parcel-shipping-labels/controllors/classes/weight_pack/class-hit-weight-strategy-descend.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'WeightPackStrategy' not found in wp-content/plugins/automated-dhl-parcel-shipping-labels/controllors/classes/weight_pack/class-hit-weight-strategy-ascend.php:28

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

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt is a good inspiration

automated-dhl-parcel-shipping-labels/hitshipo_dhlp.php 77% from 13 tests

The main file in "Automated DHL Parcel shipping labels" v. 1.1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0.1" instead of "2.6")
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("automated-dhl-parcel-shipping-labels.php" instead of "hitshipo_dhlp.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
Good job! No executable or dangerous file extensions detected5,640 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP135417184,773
XML400867

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity44.25
▷ Minimum class complexity1.00
▷ Maximum class complexity299.00
Average method complexity6.24
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods100
▷ Static methods00.00%
▷ Public methods9191.00%
▷ Protected methods00.00%
▷ Private methods99.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
controllors/views/hdhl_p.png8.71KB3.31KB▼ 61.97%
controllors/views/dhl_p.png148.99KB50.93KB▼ 65.82%