10% open-one-on-demand-delivery

Code Review | Open One On Demand Delivery

WordPress plugin Open One On Demand Delivery scored10%from 54 tests.

About plugin

  • Plugin page: open-one-on-deman...
  • Plugin version: 2.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8
  • WordPress version: 6.3.1
  • First release: Oct 14, 2020
  • Latest release: Aug 3, 2021
  • Number of updates: 33
  • Update frequency: every 8.9 days
  • Top authors: openonetech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /701 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/open-one-on-demand-delivery/openone.php+144
    date_default_timezone_set(): Timezone ID '' is invalid

Server metrics [RAM: ▼1.90MB] [CPU: ▼52.70ms] Passed 4 tests

Server-side resources used by Open One On Demand Delivery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.377.12 ▼39.45
Dashboard /wp-admin2.12 ▼1.197.90 ▼43.51
Posts /wp-admin/edit.php2.12 ▼1.259.84 ▼40.93
Add New Post /wp-admin/post-new.php2.12 ▼3.788.04 ▼86.91
Media Library /wp-admin/upload.php2.12 ▼1.128.09 ▼30.17

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Open One On Demand Delivery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲12413.45 ▼1.117.98 ▲6.2340.46 ▼7.43
Dashboard /wp-admin2,198 ▲185.59 ▼0.0597.89 ▼3.0373.32 ▲30.58
Posts /wp-admin/edit.php2,118 ▲181.97 ▼0.0038.41 ▼0.7030.50 ▼5.23
Add New Post /wp-admin/post-new.php1,540 ▲1423.14 ▲0.07772.00 ▲92.2262.49 ▼11.60
Media Library /wp-admin/upload.php1,409 ▲154.24 ▲0.07104.55 ▲6.3563.47 ▲17.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/open-one-on-demand-delivery/openone.php+144
    date_default_timezone_set(): Timezone ID '' is invalid
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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 | 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 fix the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/open-one-on-demand-delivery/include/admin-open.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/open-one-on-demand-delivery/include/calculate-delivery-fee.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/open-one-on-demand-delivery/include/openone-metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/open-one-on-demand-delivery/openone.php:12
    • > PHP Notice
      Undefined index: oneapikey in wp-content/plugins/open-one-on-demand-delivery/include/openapp-data.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/open-one-on-demand-delivery/include/request-driver.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_remote_post() in wp-content/plugins/open-one-on-demand-delivery/include/openapp-data.php:12

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: api, store, delivery, openone, e-commerce...

open-one-on-demand-delivery/openone.php 85% from 13 tests

The main PHP script in "Open One On Demand Delivery" version 2.1.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 161 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("open-one-on-demand-delivery.php" instead of "openone.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
Good job! No executable or dangerous file extensions detected506 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP610829488
JavaScript11011
CSS1007

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity8.50
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png0.58KB0.64KB0.00%