78% delivery-date-for-woocommerce

Code Review | Delivery date for woocommerce

WordPress plugin Delivery date for woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: delivery-date-for...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2019
  • Latest release: Jan 30, 2023
  • Number of updates: 111
  • Update frequency: every 13.0 days
  • Top authors: pixlogix (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

200+ active /6,803 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▲229.04ms] 75% from 4 tests

An overview of server-side resources used by Delivery date for woocommerce
Please fix the following
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 229.04ms on /wp-admin/options-general.php?page=delivery)
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.09 ▲0.68
Dashboard /wp-admin3.49 ▲0.15356.63 ▲300.57
Posts /wp-admin/edit.php3.54 ▲0.19364.30 ▲313.07
Add New Post /wp-admin/post-new.php6.03 ▲0.14404.13 ▲311.59
Media Library /wp-admin/upload.php3.35 ▲0.13338.02 ▲303.32
Delivery Date Setting /wp-admin/options-general.php?page=delivery3.35348.07

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
ddfw_delivery_options_group
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Delivery date for woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲18314.10 ▼0.346.42 ▲4.8741.60 ▲1.23
Dashboard /wp-admin2,222 ▲315.04 ▼0.8696.69 ▼3.1939.54 ▼3.90
Posts /wp-admin/edit.php2,111 ▲222.20 ▲0.2334.50 ▼6.2532.12 ▼6.56
Add New Post /wp-admin/post-new.php1,531 ▲823.24 ▲0.28573.60 ▼92.6151.48 ▲0.11
Media Library /wp-admin/upload.php1,407 ▲194.18 ▲0.02103.33 ▲6.9445.14 ▲5.08
Delivery Date Setting /wp-admin/options-general.php?page=delivery7721.8142.2534.67

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • ddfw_delivery_options_group
    • theysaidso_admin_options
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/delivery-date-for-woocommerce/public/partials/delivery_date_for_woocommerce-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/delivery-date-for-woocommerce/admin/partials/delivery_date_for_woocommerce-admin-display.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: woocommerce delivery date, custom delivery dates for order, custom delivery date, woocommerce, order delivery date for woocommerce...

delivery-date-for-woocommerce/delivery_date_for_woocommerce.php 85% from 13 tests

The main file in "Delivery date for woocommerce" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("delivery-date-for-woocommerce.php" instead of "delivery_date_for_woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,907 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS4116757
PHP12150549596
JavaScript353100499
SVG20255

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions4
▷ Named functions4100.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
11 PNG files occupy 0.20MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/img/ui-icons_ef8c08_256x240.png6.84KB4.18KB▼ 38.88%
admin/css/img/ui-bg_highlight-soft_100_eeeeee_1x100.png0.31KB0.14KB▼ 54.26%
public/css/img/ui-bg_glass_100_f6f6f6_1x400.png0.29KB0.12KB▼ 59.47%
admin/partials/customization.png22.52KB10.34KB▼ 54.10%
admin/partials/pixlogix.png114.06KB35.39KB▼ 68.97%