73% woocommerce-delivery-date

Code Review | Woocommerce Delivery Date Premium

WordPress plugin Woocommerce Delivery Date Premium scored73%from 54 tests.

About plugin

  • Plugin page: woocommerce-deliv...
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 10, 2014
  • Latest release: Jun 1, 2023
  • Number of updates: 50
  • Update frequency: every 66.8 days
  • Top authors: dreamfox (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /10,714 total downloads

Benchmarks

Plugin footprint 65% 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: ▲5.29MB] [CPU: ▲22.83ms] 75% from 4 tests

Server-side resources used by Woocommerce Delivery Date Premium
It is recommended to improve the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.29MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.17 ▲5.7164.84 ▲25.81
Dashboard /wp-admin9.19 ▲5.8477.72 ▲18.23
Posts /wp-admin/edit.php9.19 ▲5.8369.28 ▲19.86
Add New Post /wp-admin/post-new.php9.68 ▲3.79117.86 ▲27.88
Media Library /wp-admin/upload.php9.19 ▲5.9662.68 ▲27.40
Freemius Debug [v.2.5.8] /wp-admin/admin.php?page=freemius9.1954.40

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 235 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
fs_debug_mode
theysaidso_admin_options
fs_active_plugins
fs_accounts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommerce Delivery Date Premium
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲10813.63 ▼0.634.66 ▲2.4831.90 ▼17.97
Dashboard /wp-admin2,224 ▲424.87 ▼1.02104.79 ▼0.9843.11 ▲0.88
Posts /wp-admin/edit.php2,107 ▲182.01 ▲0.0138.19 ▼3.8438.84 ▲5.03
Add New Post /wp-admin/post-new.php1,523 ▼1022.93 ▼0.12612.50 ▼43.7459.93 ▲7.82
Media Library /wp-admin/upload.php1,406 ▲184.25 ▲0.0797.76 ▼2.3245.49 ▲2.45
Freemius Debug [v.2.5.8] /wp-admin/admin.php?page=freemius1,0682.2025.0128.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/woocommerce-delivery-date/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-comments
    • fs_debug_mode
    • fs_active_plugins
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • fs_accounts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 23× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woocommerce-delivery-date/src/Views/templates/admin_order_view.php:2
    • > PHP Warning
      Use of undefined constant DREAMFOX_WDD_PLUGIN_FILE - assumed 'DREAMFOX_WDD_PLUGIN_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/woocommerce-delivery-date/defines.php on line 2
    • > PHP Fatal error
      Uncaught Error: Interface 'Dreamfox\\DeliveryDate\\Interfaces\\AssetsInterface' not found in wp-content/plugins/woocommerce-delivery-date/src/Abstracts/AbstractAssets.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/woocommerce-delivery-date/defines.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woocommerce-delivery-date/src/Views/templates/order_view.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Dreamfox\\DeliveryDate\\BaseWebAdmin' not found in wp-content/plugins/woocommerce-delivery-date/src/Admin/Backend.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Dreamfox\\DeliveryDate\\Abstracts\\AbstractWebApplication' not found in wp-content/plugins/woocommerce-delivery-date/src/BaseWebAdmin.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Dreamfox\\DeliveryDate\\Views\\BaseView' not found in wp-content/plugins/woocommerce-delivery-date/src/Views/EmailView.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WC() in wp-content/plugins/woocommerce-delivery-date/src/Views/templates/delivery_date.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Dreamfox\\DeliveryDate\\Abstracts\\AbstractWebApplication' not found in wp-content/plugins/woocommerce-delivery-date/src/Site/Frontend.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: delivery, woocommerce, plugin, free, delivery date

woocommerce-delivery-date/woocommerce-delivery-date.php 92% from 13 tests

Analyzing the main PHP file in "Woocommerce Delivery Date Premium" version 2.1.3
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/lang/")

Code Analysis 97% from 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
No dangerous file extensions were detected63,669 lines of code in 186 files:
LanguageFilesBlank linesComment linesLines of code
PHP1628,14617,18333,897
JSON30029,464
JavaScript43459205
HTML132043
Markdown132038
CSS150022

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,079)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity54.72
▷ Minimum class complexity1.00
▷ Maximum class complexity3,079.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces10
Interfaces4
Traits0
Classes79
▷ Abstract classes67.59%
▷ Concrete classes7392.41%
▷ Final classes00.00%
Methods1,368
▷ Static methods20815.20%
▷ Public methods95870.03%
▷ Protected methods352.56%
▷ Private methods37527.41%
Functions98
▷ Named functions9798.98%
▷ Anonymous functions11.02%
Constants155
▷ Global constants10165.16%
▷ Class constants5434.84%
▷ Public constants54100.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
5 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/free/public/logo192.png5.22KB5.57KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/images/newsletter-button.png9.94KB4.50KB▼ 54.71%
assets/free/public/logo512.png9.44KB10.35KB0.00%