83% delivery-drivers-manager

Code Review | Delivery Drivers Manager

WordPress plugin Delivery Drivers Manager scored83%from 54 tests.

About plugin

  • Plugin page: delivery-drivers-...
  • Plugin version: 1.1.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Jun 6, 2021
  • Latest release: Jul 7, 2023
  • Number of updates: 20
  • Update frequency: every 38.7 days
  • Top authors: powerfulwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,385 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Delivery Drivers Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.72 ▼6.55
Dashboard /wp-admin3.31 ▲0.0147.33 ▼1.25
Posts /wp-admin/edit.php3.36 ▲0.0145.19 ▼1.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.69 ▼14.46
Media Library /wp-admin/upload.php3.24 ▲0.0131.44 ▼4.25

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 219 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
pwddm_manager_page
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Delivery Drivers Manager: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.361.61 ▲0.0535.52 ▼2.19
Dashboard /wp-admin2,195 ▲155.64 ▲0.0391.25 ▼3.0040.33 ▼3.51
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0039.75 ▲1.0235.40 ▲0.27
Add New Post /wp-admin/post-new.php1,536 ▲818.09 ▼5.06594.90 ▼73.0570.23 ▲19.35
Media Library /wp-admin/upload.php1,394 ▼34.20 ▲0.0193.53 ▼6.9340.85 ▼5.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • pwddm_manager_page
    • widget_recent-comments
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/delivery-drivers-manager/public/partials/pwddm-public-display.php
    • > /wp-content/plugins/delivery-drivers-manager/admin/partials/pwddm-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: You can take inspiration from this readme.txt

delivery-drivers-manager/delivery-drivers-manager.php 92% from 13 tests

"Delivery Drivers Manager" version 1.1.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin53,116 lines of code in 167 files:
LanguageFilesBlank linesComment linesLines of code
PHP1408,51318,73237,412
CSS181,5718412,338
JavaScript8174812,309
PO File13174141,057

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity78.63
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes63
▷ Abstract classes23.17%
▷ Concrete classes6196.83%
▷ Final classes00.00%
Methods1,366
▷ Static methods20114.71%
▷ Public methods97171.08%
▷ Protected methods171.24%
▷ Private methods37827.67%
Functions118
▷ Named functions118100.00%
▷ Anonymous functions00.00%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 1.18MB with 0.80MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
public/images/pwddm.png219.11KB81.54KB▼ 62.79%
(invalid) public/images/user.png1.49KB0.00KB▼ 100.00%
public/images/routes-preview.png959.39KB350.17KB▼ 63.50%
public/images/drivers_app.png8.22KB2.99KB▼ 63.68%