77% woo-delivery

Code Review | Delivery & Pickup Date Time for WooCommerce

WordPress plugin Delivery & Pickup Date Time for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: woo-delivery
  • Plugin version: 1.3.63
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.4
  • WordPress version: 6.3.1
  • First release: Sep 12, 2019
  • Latest release: Nov 26, 2023
  • Number of updates: 376
  • Update frequency: every 4.1 days
  • Top authors: shoroar (100%)

Code review

54 tests

User reviews

241 reviews

Install metrics

7,000+ active /426,600 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.49MB] [CPU: ▼8.30ms] Passed 4 tests

An overview of server-side resources used by Delivery & Pickup Date Time for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2438.52 ▼3.74
Dashboard /wp-admin4.16 ▲0.8250.86 ▼6.36
Posts /wp-admin/edit.php4.21 ▲0.8652.79 ▲7.57
Add New Post /wp-admin/post-new.php5.99 ▲0.1067.44 ▼30.67
Media Library /wp-admin/upload.php4.02 ▲0.7942.29 ▲9.79

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 38 new files
Database: no new tables, 8 new options
New WordPress options
coderockz-woo-delivery-activation-time
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
recovery_mode_email_last_sent
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Delivery & Pickup Date Time for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,492 ▼25514.86 ▲0.530.68 ▼1.1320.84 ▼21.89
Dashboard /wp-admin2,233 ▲556.74 ▲1.06136.45 ▲29.5042.42 ▲5.26
Posts /wp-admin/edit.php2,140 ▲403.59 ▲1.5682.88 ▲44.6135.92 ▲0.75
Add New Post /wp-admin/post-new.php45 ▼1,4810.41 ▼22.590.07 ▼647.389.77 ▼48.43
Media Library /wp-admin/upload.php1,435 ▲385.27 ▲1.13174.14 ▲78.1548.42 ▲6.94

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • coderockz-woo-delivery-activation-time
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-delivery/public/partials/coderockz-woo-delivery-public-display.php
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'CODEROCKZ_WOO_DELIVERY_DIRincludes/class-coderockz-woo-delivery-helper.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-delivery/includes/class-coderockz-woo-delivery-delivery-option.php on line 2
    • > PHP Warning
      Use of undefined constant CODEROCKZ_WOO_DELIVERY_DIR - assumed 'CODEROCKZ_WOO_DELIVERY_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-delivery/includes/class-coderockz-woo-delivery-pickup-time-option.php on line 3
    • > PHP Warning
      require_once(CODEROCKZ_WOO_DELIVERY_DIRincludes/class-coderockz-woo-delivery-helper.php): failed to open stream: No such file or directory in wp-content/plugins/woo-delivery/includes/class-coderockz-woo-delivery-delivery-option.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-delivery/admin/partials/coderockz-woo-delivery-admin-display.php:15
    • > PHP Warning
      Use of undefined constant CODEROCKZ_WOO_DELIVERY_DIR - assumed 'CODEROCKZ_WOO_DELIVERY_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-delivery/includes/class-coderockz-woo-delivery-delivery-option.php on line 2
    • > PHP Warning
      require_once(CODEROCKZ_WOO_DELIVERY_DIRincludes/class-coderockz-woo-delivery-helper.php): failed to open stream: No such file or directory in wp-content/plugins/woo-delivery/includes/class-coderockz-woo-delivery-time-option.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'CODEROCKZ_WOO_DELIVERY_DIRincludes/class-coderockz-woo-delivery-helper.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-delivery/includes/class-coderockz-woo-delivery-pickup-time-option.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'CODEROCKZ_WOO_DELIVERY_DIRincludes/class-coderockz-woo-delivery-helper.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-delivery/includes/class-coderockz-woo-delivery-time-option.php on line 3
    • > PHP Warning
      Use of undefined constant CODEROCKZ_WOO_DELIVERY_DIR - assumed 'CODEROCKZ_WOO_DELIVERY_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-delivery/includes/class-coderockz-woo-delivery-time-option.php on line 3
    • > PHP Warning
      require_once(CODEROCKZ_WOO_DELIVERY_DIRincludes/class-coderockz-woo-delivery-helper.php): failed to open stream: No such file or directory in wp-content/plugins/woo-delivery/includes/class-coderockz-woo-delivery-pickup-time-option.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

woo-delivery/coderockz-woo-delivery.php 85% from 13 tests

The main file in "Delivery & Pickup Date Time for WooCommerce" v. 1.3.63 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 274 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-delivery.php" instead of "coderockz-woo-delivery.php")

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin5,004 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP161,0506084,673
PO File1124185288
JavaScript703337
CSS40106

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 137)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity101.45
▷ Minimum class complexity1.00
▷ Maximum class complexity643.00
Average method complexity16.08
▷ Minimum method complexity1.00
▷ Maximum method complexity137.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods75
▷ Static methods56.67%
▷ Public methods7093.33%
▷ Protected methods00.00%
▷ Private methods56.67%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.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
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/woo-delivery-logo.png12.79KB13.19KB0.00%
admin/images/arrow.png0.23KB0.24KB0.00%