78% deliveryman-management

Code Review | Delivery Man Management with delivery report for Woocommerce

WordPress plugin Delivery Man Management with delivery report for Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: deliveryman-manag...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.1.1
  • WordPress version: 6.3.1
  • First release: Jun 3, 2017
  • Latest release: Mar 29, 2019
  • Number of updates: 42
  • Update frequency: every 15.8 days
  • Top authors: mohsin86 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,346 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.01MB] [CPU: ▼6.05ms] Passed 4 tests

Server-side resources used by Delivery Man Management with delivery report for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.83 ▼3.06
Dashboard /wp-admin3.32 ▲0.0150.98 ▼0.21
Posts /wp-admin/edit.php3.37 ▲0.0150.36 ▲1.85
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.35 ▼22.78
Media Library /wp-admin/upload.php3.24 ▲0.0140.84 ▲5.58

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Delivery Man Management with delivery report for Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.74 ▲0.342.06 ▲0.3844.88 ▲5.60
Dashboard /wp-admin2,194 ▲145.62 ▲0.0288.55 ▼5.9843.84 ▲3.28
Posts /wp-admin/edit.php2,105 ▲51.99 ▼0.0334.77 ▼0.1935.59 ▼2.98
Add New Post /wp-admin/post-new.php1,533 ▲523.33 ▼0.08669.02 ▼1.5963.60 ▲9.45
Media Library /wp-admin/upload.php1,396 ▼44.22 ▲0.04101.02 ▼2.9242.27 ▼4.60

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 7 options in the database
    • can_compress_scripts
    • weblounge_woocommerce_prompt
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/deliveryman-management/woocommerce-delivery-management.php
    • > /wp-content/plugins/deliveryman-management/includes/class-main.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/deliveryman-management/includes/delivery-man-page.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/deliveryman-management/includes/common.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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 your attention: Please take inspiration from this readme.txt

deliveryman-management/woocommerce-delivery-management.php 92% from 13 tests

The entry point to "Delivery Man Management with delivery report for Woocommerce" version 1.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("deliveryman-management.php" instead of "woocommerce-delivery-management.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin2,357 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript103111511,469
PHP5189160619
CSS426269

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity17.00
▷ Minimum class complexity13.00
▷ Maximum class complexity21.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods13.70%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sort_asc.png0.16KB0.25KB0.00%
assets/images/sort_both.png0.20KB0.29KB0.00%
assets/images/sort_desc_disabled.png0.14KB0.25KB0.00%
assets/images/sort_asc_disabled.png0.14KB0.25KB0.00%
assets/images/sort_desc.png0.15KB0.25KB0.00%