83% delivery-drivers-for-vendors

Code Review | Delivery Drivers for Vendors

WordPress plugin Delivery Drivers for Vendors scored 83% from 54 tests.

About plugin

  • Plugin page: delivery-drivers-...
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9
  • WordPress version: 5.9.2
  • First release: Jun 25, 2021
  • Latest release: Mar 4, 2022
  • Number of updates: 12
  • Update frequency: every 21.7 days
  • Top authors: powerfulwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 947 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼307.17ms] Passed 4 tests

This is a short check of server-side resources used by Delivery Drivers for Vendors
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1557.41 ▲3.44
Dashboard /wp-admin3.48 ▲0.0833.61 ▼30.73
Posts /wp-admin/edit.php3.72 ▲0.0843.46 ▲6.52
Add New Post /wp-admin/post-new.php6.95 ▼0.0196.07 ▼1,202.53
Media Library /wp-admin/upload.php3.37 ▲0.0726.95 ▲1.14

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 208 new files
Database: no new tables, 1 new option
New WordPress options
ddfwm_vendors_page

Browser metrics Passed 4 tests

This is an overview of browser requirements for Delivery Drivers for Vendors
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,753 ▲3115.70 ▲0.036.46 ▲0.042.45 ▼0.09
Dashboard /wp-admin2,880 ▲196.06 ▼0.12140.06 ▲5.35165.24 ▲3.98
Posts /wp-admin/edit.php2,691 ▲63.23 ▼0.0164.48 ▼1.66136.45 ▼38.17
Add New Post /wp-admin/post-new.php1,773 ▲6221.14 ▲0.38443.63 ▼14.50180.37 ▲21.11
Media Library /wp-admin/upload.php1,698 ▼35.44 ▼0.05171.50 ▲24.26190.15 ▼6.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 1 option
    • ddfwm_vendors_page

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/delivery-drivers-for-vendors/admin/partials/ddfwm-admin-display.php
    • > /wp-content/plugins/delivery-drivers-for-vendors/public/partials/ddfwm-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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: You can look at the official readme.txt

delivery-drivers-for-vendors/delivery-drivers-for-vendors.php 92% from 13 tests

The principal PHP file in "Delivery Drivers for Vendors" v. 1.0.9 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected51,212 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
PHP1328,23918,39736,839
CSS171,5145812,080
JavaScript8162812,293

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,029)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity78.70
▷ Minimum class complexity1.00
▷ Maximum class complexity3,029.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes61
▷ Abstract classes23.28%
▷ Concrete classes5996.72%
▷ Final classes00.00%
Methods1,310
▷ Static methods18714.27%
▷ Public methods94572.14%
▷ Protected methods151.15%
▷ Private methods35026.72%
Functions114
▷ Named functions114100.00%
▷ Anonymous functions00.00%
Constants134
▷ Global constants10276.12%
▷ Class constants3223.88%
▷ Public constants32100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.40MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/favicon-32x32.png3.25KB1.58KB▼ 51.32%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
public/images/drivers_app.png8.22KB2.99KB▼ 63.68%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
(invalid) public/images/user.png1.49KB0.00KB▼ 100.00%