62% dwp-courier-delivery-management

Code Review | DWP Courier & Delivery Management

WordPress plugin DWP Courier & Delivery Management scored62%from 54 tests.

About plugin

  • Plugin page: dwp-courier-deliv...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 9, 2021
  • Latest release: Sep 9, 2023
  • Number of updates: 7
  • Update frequency: every 95.6 days
  • Top authors: dragwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,378 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.66ms] Passed 4 tests

Server-side resources used by DWP Courier & Delivery Management
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1337.06 ▼6.30
Dashboard /wp-admin3.44 ▲0.1346.53 ▼3.82
Posts /wp-admin/edit.php3.55 ▲0.1944.94 ▼3.73
Add New Post /wp-admin/post-new.php6.02 ▲0.1380.66 ▼0.45
Media Library /wp-admin/upload.php3.36 ▲0.1335.05 ▼0.80
Delivery List /wp-admin/admin.php?page=dwp-delivery-list3.3130.95
Submit Delivery Request /wp-admin/admin.php?page=dwp-submit-delivery-request3.3130.12
Merchant List /wp-admin/admin.php?page=dwp-merchant-list3.3127.52
Dashboard /wp-admin/admin.php?page=dwp-courier-management3.3629.73
Merchant Registration /wp-admin/admin.php?page=dwp-merchant-registration3.3834.04

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 1,454 new files
Database: 2 new tables, 6 new options
New tables
wp_dwp_delivery_request_submit
wp_dwp_merchant_registration
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for DWP Courier & Delivery Management
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲14613.84 ▼0.768.09 ▲6.2856.64 ▲12.58
Dashboard /wp-admin2,230 ▲505.54 ▼0.1386.18 ▼12.9438.04 ▼7.25
Posts /wp-admin/edit.php2,135 ▲351.94 ▼0.0933.87 ▼0.6833.97 ▲1.17
Add New Post /wp-admin/post-new.php1,554 ▲2623.47 ▲0.30655.36 ▼8.5361.43 ▲8.82
Media Library /wp-admin/upload.php1,435 ▲354.26 ▲0.05103.55 ▼8.4248.88 ▲0.10
Delivery List /wp-admin/admin.php?page=dwp-delivery-list1,0432.5650.8358.14
Submit Delivery Request /wp-admin/admin.php?page=dwp-submit-delivery-request1,1102.2631.9242.48
Merchant List /wp-admin/admin.php?page=dwp-merchant-list1,0732.6143.6725.06
Dashboard /wp-admin/admin.php?page=dwp-courier-management9712.2226.3344.40
Merchant Registration /wp-admin/admin.php?page=dwp-merchant-registration1,2703.6342.2959.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 2 tables
    • wp_dwp_delivery_request_submit
    • wp_dwp_merchant_registration
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dwp-merchant-list
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dwp-merchant-list
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)

SRP 0% 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/dwp-courier-delivery-management/admin/partials/dwp-courier-management-admin-display.php
    • > /wp-content/plugins/dwp-courier-delivery-management/public/partials/dwp-courier-management-public-display.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dwp-courier-delivery-management/admin/partials/tmpl-delivery-list.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_media() in wp-content/plugins/dwp-courier-delivery-management/admin/partials/tmpl-merchant-registration.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dwp-courier-delivery-management/admin/partials/tmpl-admin-dashboard.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dwp-courier-delivery-management/admin/partials/tmpl-merchant-list.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dwp-courier-delivery-management/admin/partials/tmpl-submit-delivery-request.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
Please take inspiration from this readme.txt

dwp-courier-delivery-management/dwp-courier-management.php 92% from 13 tests

The principal PHP file in "DWP Courier & Delivery Management" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dwp-courier-delivery-management.php" instead of "dwp-courier-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
Everything looks great! No dangerous files found in this plugin17,476 lines of code in 1,439 files:
LanguageFilesBlank linesComment linesLines of code
HTML1505,666
SVG1,407004,810
Sass1402,835
CSS613141,478
JSON1001,408
PHP172985861,007
JavaScript66654272

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.14
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
3 compressed PNG files occupy 0.10MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sort_asc.png0.16KB0.25KB0.00%
assets/images/placeholder.png100.24KB73.05KB▼ 27.12%
assets/images/sort_both.png0.20KB0.29KB0.00%