78% deliveryplus-by-invisible-dragon

Code Review | DeliveryPlus

WordPress plugin DeliveryPlus scored78%from 54 tests.

About plugin

  • Plugin page: deliveryplus-by-i...
  • Plugin version: 1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.9-6.0
  • WordPress version: 6.3.1
  • First release: Feb 27, 2020
  • Latest release: Sep 17, 2022
  • Number of updates: 10
  • Update frequency: every 93.2 days
  • Top authors: invisibledragonltd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /652 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼3.56ms] Passed 4 tests

An overview of server-side resources used by DeliveryPlus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2940.45 ▲0.92
Dashboard /wp-admin3.62 ▲0.3146.70 ▼4.31
Posts /wp-admin/edit.php3.67 ▲0.3167.10 ▲17.89
Add New Post /wp-admin/post-new.php6.15 ▲0.2691.31 ▼15.21
Media Library /wp-admin/upload.php3.48 ▲0.2437.71 ▲4.38

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for DeliveryPlus
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.191.65 ▲0.1240.25 ▼0.05
Dashboard /wp-admin2,209 ▲244.80 ▼0.06108.20 ▲5.6939.02 ▼4.43
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0438.87 ▲4.2034.10 ▲2.62
Add New Post /wp-admin/post-new.php1,529 ▼1318.22 ▼0.24597.72 ▲2.4056.32 ▼18.46
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0296.99 ▲3.7744.11 ▲4.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/deliveryplus-by-invisible-dragon/tests/bootstrap.php
  • 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'class.DeliveryPlus_Filters.php' (include_path='.:/usr/share/php') in wp-content/plugins/deliveryplus-by-invisible-dragon/tests/test-weight-filter.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/deliveryplus-by-invisible-dragon/tests/test-replacements.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/deliveryplus-by-invisible-dragon/class.DeliveryPlus_Shipping_Method.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DeliveryPlus_Filter_Number' not found in wp-content/plugins/deliveryplus-by-invisible-dragon/class.DeliveryPlus_Filter_Weight.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/deliveryplus-by-invisible-dragon/includes/filters.php:13
    • > PHP Warning
      require_once(class.DeliveryPlus_Filters.php): failed to open stream: No such file or directory in wp-content/plugins/deliveryplus-by-invisible-dragon/tests/test-weight-filter.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_meta() on null in wp-content/plugins/deliveryplus-by-invisible-dragon/includes/single-options.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/deliveryplus-by-invisible-dragon/id-delivery.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'DeliveryPlus_Filter_Set' not found in wp-content/plugins/deliveryplus-by-invisible-dragon/class.DeliveryPlus_Filter_Override.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DeliveryPlus_Filter_Set' not found in wp-content/plugins/deliveryplus-by-invisible-dragon/class.DeliveryPlus_Filter_Category.php:3

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocommerce, delivery, acf, advancedcustomfields, gravityforms

deliveryplus-by-invisible-dragon/id-delivery.php 77% from 13 tests

"DeliveryPlus" version 1.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.2" instead of "5.6")
  • Requires at least: The required version number must match the one declared in readme.txt ("6.0" instead of "6.9")
  • Main file name: Name the main plugin file the same as the plugin slug ("deliveryplus-by-invisible-dragon.php" instead of "id-delivery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,871 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP175021761,358
Bourne Shell37048266
JavaScript13614139
Markdown126050
XML241249
SVG1019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.90
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes29.52%
▷ Concrete classes1990.48%
▷ Final classes00.00%
Methods123
▷ Static methods6653.66%
▷ Public methods12299.19%
▷ Protected methods00.00%
▷ Private methods10.81%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected