83% delivery-drivers-for-vendors

Code Review | Delivery Drivers for Vendors

WordPress plugin Delivery Drivers for Vendors scored83%from 54 tests.

About plugin

  • Plugin page: delivery-drivers-...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Jun 25, 2021
  • Latest release: Sep 16, 2023
  • Number of updates: 18
  • Update frequency: every 45.6 days
  • Top authors: powerfulwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,512 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.06MB] [CPU: ▼7.06ms] 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.54 ▲0.0841.85 ▲0.07
Dashboard /wp-admin3.38 ▲0.0345.74 ▼14.26
Posts /wp-admin/edit.php3.50 ▲0.1449.47 ▲1.25
Add New Post /wp-admin/post-new.php5.97 ▲0.0782.04 ▼15.30
Media Library /wp-admin/upload.php3.31 ▲0.0735.99 ▲5.34

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

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

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 /2,789 ▲4314.34 ▼0.011.67 ▲0.1143.73 ▲4.32
Dashboard /wp-admin2,195 ▲145.62 ▼0.0890.59 ▼5.5642.61 ▲5.43
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0238.70 ▲2.4534.72 ▼2.89
Add New Post /wp-admin/post-new.php1,526 ▼023.73 ▲0.64667.00 ▼4.7456.38 ▲5.77
Media Library /wp-admin/upload.php1,400 ▲34.16 ▼0.0993.43 ▼7.2342.74 ▼0.73

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: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • ddfwm_vendors_page
    • can_compress_scripts
    • widget_theysaidso_widget

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/public/partials/ddfwm-public-display.php
    • > /wp-content/plugins/delivery-drivers-for-vendors/admin/partials/ddfwm-admin-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.1.1 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,924 lines of code in 165 files:
LanguageFilesBlank linesComment linesLines of code
PHP1398,48718,80037,550
CSS181,5145812,081
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,073)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity78.21
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes63
▷ Abstract classes23.17%
▷ Concrete classes6196.83%
▷ Final classes00.00%
Methods1,369
▷ Static methods20314.83%
▷ Public methods97471.15%
▷ Protected methods171.24%
▷ Private methods37827.61%
Functions119
▷ Named functions119100.00%
▷ Anonymous functions00.00%
Constants149
▷ Global constants10268.46%
▷ Class constants4731.54%
▷ Public constants47100.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.26MB 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/favicon-32x32.png3.25KB1.58KB▼ 51.32%
(invalid) public/images/user.png1.49KB0.00KB▼ 100.00%
public/images/ddfwm.png53.74KB19.65KB▼ 63.43%
public/images/drivers_app.png8.22KB2.99KB▼ 63.68%