84% wc-burq-on-demand-delivery

Code Review | Burq: On-Demand Delivery for WooCommerce

WordPress plugin Burq: On-Demand Delivery for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-burq-on-demand...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.8
  • WordPress version: 6.3.1
  • First release: Jul 15, 2021
  • Latest release: Nov 17, 2021
  • Number of updates: 22
  • Update frequency: every 5.8 days
  • Top authors: burqinc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /343 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼10.64ms] Passed 4 tests

A check of server-side resources used by Burq: On-Demand Delivery for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.45 ▼4.29
Dashboard /wp-admin3.31 ▲0.0052.60 ▼4.90
Posts /wp-admin/edit.php3.36 ▲0.0047.29 ▼12.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.31 ▼20.70
Media Library /wp-admin/upload.php3.23 ▲0.0036.88 ▲2.05

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Burq: On-Demand Delivery for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.72 ▲0.071.98 ▲0.3043.13 ▼1.11
Dashboard /wp-admin2,198 ▲215.49 ▼0.1188.48 ▼9.8439.87 ▼2.75
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0234.98 ▼5.1333.71 ▼7.36
Add New Post /wp-admin/post-new.php1,528 ▼923.30 ▲4.92659.59 ▲22.0552.87 ▼15.61
Media Library /wp-admin/upload.php1,397 ▼04.20 ▲0.02109.71 ▲7.9847.71 ▲4.35

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-burq-on-demand-delivery/burq-on-demand-delivery-for-woocommerce.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-burq-on-demand-delivery/includes/shipping.php:104
    • > PHP Fatal error
      require_once(): Failed opening required 'BURQ_PLUGIN_DIRincludes/api.php' (include_path='.:/usr/share/php') in wp-content/plugins/wc-burq-on-demand-delivery/includes/loader.php on line 21
    • > PHP Warning
      Use of undefined constant BURQ_PLUGIN_DIR - assumed 'BURQ_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wc-burq-on-demand-delivery/includes/loader.php on line 21
    • > PHP Warning
      require_once(BURQ_PLUGIN_DIRincludes/api.php): failed to open stream: No such file or directory in wp-content/plugins/wc-burq-on-demand-delivery/includes/loader.php on line 21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: on-demand-delivery, shipping-quote, shipping-plugin, woocommerce, wordpress...

wc-burq-on-demand-delivery/burq-on-demand-delivery-for-woocommerce.php 92% from 13 tests

Analyzing the main PHP file in "Burq: On-Demand Delivery for WooCommerce" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-burq-on-demand-delivery.php" instead of "burq-on-demand-delivery-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin345 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5126116345

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity10.33
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin