62% byconsole-woo-order-delivery-time

Code Review | WooODT Lite - WooCommerce Order Delivery or Pickup with Date Time Location

WordPress plugin WooODT Lite - WooCommerce Order Delivery or Pickup with Date Time Location scored62%from 54 tests.

About plugin

  • Plugin page: byconsole-woo-ord...
  • Plugin version: 2.4.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Jul 15, 2016
  • Latest release: Aug 31, 2023
  • Number of updates: 229
  • Update frequency: every 11.4 days
  • Top authors: mdalabar (100%)

Code review

54 tests

User reviews

106 reviews

Install metrics

1,000+ active /96,010 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▼2.24ms] Passed 4 tests

An overview of server-side resources used by WooODT Lite - WooCommerce Order Delivery or Pickup with Date Time Location
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4841.07 ▲0.99
Dashboard /wp-admin3.78 ▲0.4855.72 ▼0.73
Posts /wp-admin/edit.php3.90 ▲0.5451.29 ▲0.11
Add New Post /wp-admin/post-new.php6.36 ▲0.4788.89 ▼9.32
Media Library /wp-admin/upload.php3.70 ▲0.4739.02 ▲2.04
Plugin deactivation survey /wp-admin/admin.php?page=byc_wooodtlite_deactivation_survey3.6835.39
Delivery Pickup Calendar /wp-admin/admin.php?page=byconsolewooodt_admin_delivery_pickup_calender_settings_page3.6534.45

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 87 new files
Database: no new tables, 14 new options
New WordPress options
bycwooodt_language_translate
byconsolewooodt_extra_options
db_upgraded
byconsolewooodt_odt_setting
theysaidso_admin_options
byconsolewooodt_holidays_setting
widget_recent-posts
widget_byconsolewooodt_widget
byconsolewooodt_free_plugin_activation_date
byconsolewooodt_discount_percentage_amount
...

Browser metrics Passed 4 tests

A check of browser resources used by WooODT Lite - WooCommerce Order Delivery or Pickup with Date Time Location
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,018 ▲26814.10 ▼0.2515.01 ▲13.3437.87 ▼2.83
Dashboard /wp-admin2,244 ▲705.61 ▲0.0289.36 ▲3.1769.25 ▲28.89
Posts /wp-admin/edit.php2,164 ▲852.02 ▼0.0237.34 ▲2.7333.22 ▼1.87
Add New Post /wp-admin/post-new.php1,600 ▲7221.62 ▼1.32772.61 ▲101.1462.82 ▲3.50
Media Library /wp-admin/upload.php1,464 ▲644.13 ▼0.1897.14 ▼7.2574.15 ▲32.43
Plugin deactivation survey /wp-admin/admin.php?page=byc_wooodtlite_deactivation_survey8573.0840.3229.10
Delivery Pickup Calendar /wp-admin/admin.php?page=byconsolewooodt_admin_delivery_pickup_calender_settings_page8572.9740.7028.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin has failed uninstalling correctly, leaving 87 files (1.43MB) in the plugin directory
    • (new file) css/images/ui-bg_flat_75_ffffff_40x100.png
    • (new file) class/ByConsoleWooODTLite.php
    • (new file) css/admin.css
    • (new file) css/images/ui-bg_flat_30_cccccc_40x100.png
    • (new file) ByConsoleWooODT.php
    • (new file) css/images/ui-bg_glass_20_555555_1x400.png
    • (new file) assets/.empty
    • (new file) css/bycwooodt_admin_ordered_calender.css
    • (new file) css/images/ui-bg_flat_0_aaaaaa_40x100.png
    • (new file) css/images/ui-bg_flat_50_5c5c5c_40x100.png
    • ...
  • This plugin does not fully uninstall, leaving 14 options in the database
    • theysaidso_admin_options
    • byconsolewooodt_discount_percentage_amount
    • widget_theysaidso_widget
    • byconsolewooodt_free_plugin_activation_date
    • byconsolewooodt_extra_options
    • bycwooodt_language_translate
    • byconsolewooodt_holidays_setting
    • can_compress_scripts
    • byconsolewooodt_free_plugin_admin_access_date
    • widget_recent-posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=byconsolewooodt_admin_delivery_pickup_calender_settings_page
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'byconsolewooodt_admin_delivery_pickup_calender_settings_form' not found or invalid function name

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/byconsole-woo-order-delivery-time/inc/bycwooodt_get_all_orders.php
    • > /wp-content/plugins/byconsole-woo-order-delivery-time/inc/bycwooodt_pickup_delivery_calender.php
    • > /wp-content/plugins/byconsole-woo-order-delivery-time/inc/bycwooodt_odt_compare_free_and_pro_version_setting.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/byconsole-woo-order-delivery-time/inc/bycwooodt_language_fields_setting.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/byconsole-woo-order-delivery-time/inc/bycwooodt_custom_modification_request.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/byconsole-woo-order-delivery-time/inc/byconsolewooodt_holiday_management.php:1579
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/byconsole-woo-order-delivery-time/inc/bycwooodt_deactivation.php:161
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/byconsole-woo-order-delivery-time/inc/byconsolewooodt_location_field_settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/byconsole-woo-order-delivery-time/inc/bycwooodt_odt_fields_setting.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/byconsole-woo-order-delivery-time/inc/byconsolewooodt_modification_request_details.php:936
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/byconsole-woo-order-delivery-time/inc/bycwooodt_odt_compare_free_and_pro_version_setting.php:241
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/byconsole-woo-order-delivery-time/inc/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/byconsole-woo-order-delivery-time/inc/bycwooodt_location_fields_setting.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
The official readme.txt is a good inspiration

byconsole-woo-order-delivery-time/ByConsoleWooODT.php 92% from 13 tests

The main PHP script in "WooODT Lite - WooCommerce Order Delivery or Pickup with Date Time Location" version 2.4.6 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("byconsole-woo-order-delivery-time.php" instead of "ByConsoleWooODT.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin7,786 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP196,0496134,292
CSS81,1642801,728
PO File65285741,637
JavaScript1025334129

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity29.50
▷ Minimum class complexity22.00
▷ Maximum class complexity37.00
Average method complexity6.18
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods218.18%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions74
▷ Named functions74100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
34 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bycwooodt_admin_menu_icon.png3.55KB0.68KB▼ 80.89%
css/images/ui-bg_glass_40_ffc73d_1x400.png0.31KB0.16KB▼ 49.37%
css/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
css/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%