73% product-delivery-date

Code Review | Product Delivery Date

WordPress plugin Product Delivery Date scored73%from 54 tests.

About plugin

  • Plugin page: product-delivery-...
  • Plugin version: 1.1.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Dec 31, 2022
  • Latest release: Nov 12, 2023
  • Number of updates: 18
  • Update frequency: every 17.7 days
  • Top authors: dimath99 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /800 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.56MB] [CPU: ▼3.51ms] Passed 4 tests

Analyzing server-side resources used by Product Delivery Date
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6142.11 ▲0.83
Dashboard /wp-admin3.94 ▲0.5949.99 ▼13.57
Posts /wp-admin/edit.php3.99 ▲0.6354.31 ▲4.79
Add New Post /wp-admin/post-new.php6.47 ▲0.5997.07 ▼6.09
Media Library /wp-admin/upload.php3.69 ▲0.4742.83 ▲4.85
Email Settings /wp-admin/admin.php?page=wooproddelpluginsettingstab3.6639.05
Orders with Delivery Dates /wp-admin/admin.php?page=wooproddel_orders_with_delivery_dates3.6539.41
Delivery Date /wp-admin/admin.php?page=wooproddel_settings3.9342.73
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius4.0237.95

Server storage [IO: ▲4.46MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 192 new files
Database: no new tables, 9 new options
New WordPress options
fs_accounts
theysaidso_admin_options
fs_active_plugins
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
fs_debug_mode
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Product Delivery Date
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6214.77 ▲0.161.70 ▼0.1332.47 ▼16.96
Dashboard /wp-admin2,226 ▲526.78 ▲1.17112.76 ▲7.3845.47 ▲1.41
Posts /wp-admin/edit.php2,135 ▲323.70 ▲1.6950.68 ▲10.0941.66 ▲7.51
Add New Post /wp-admin/post-new.php6,266 ▲4,73723.03 ▼0.09998.63 ▲353.3138.14 ▼12.58
Media Library /wp-admin/upload.php1,434 ▲376.25 ▲2.05117.28 ▲13.4546.86 ▲1.12
Email Settings /wp-admin/admin.php?page=wooproddelpluginsettingstab8813.2835.9330.93
Orders with Delivery Dates /wp-admin/admin.php?page=wooproddel_orders_with_delivery_dates1,0894.2356.5546.75
Delivery Date /wp-admin/admin.php?page=wooproddel_settings9963.3735.1059.28
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,0863.3435.8125.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/product-delivery-date/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 9 options
    • can_compress_scripts
    • widget_recent-posts
    • fs_accounts
    • fs_active_plugins
    • theysaidso_admin_options
    • fs_debug_mode
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-delivery-date/dateorderscolumn.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-delivery-date/helper/tableexport.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/product-delivery-date/orderscalendar.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The plugin main settings page), #2 (The email settings page), #3 (The orders with delivery dates table), #4 (The delivery date column in the woocommerce products page), #5 (The min and max settings in the woocommerce products bulk actions), #6 (The min and max settings in the products page), #7 (The order delivery datepicker for products in the checkout page), #8 (The order delivery datepicker for orders in the checkout page)
You can take inspiration from this readme.txt

product-delivery-date/dateorders-woo.php 85% from 13 tests

The primary PHP file in "Product Delivery Date" version 1.1.6 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("product-delivery-date.php" instead of "dateorders-woo.php")

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
Success! There were no dangerous files found in this plugin42,316 lines of code in 148 files:
LanguageFilesBlank linesComment linesLines of code
PHP1238,17017,45133,938
JavaScript82,1151,9327,508
Markdown21890767
CSS15153103

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity87.19
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,277
▷ Static methods19915.58%
▷ Public methods87768.68%
▷ Protected methods171.33%
▷ Private methods38329.99%
Functions132
▷ Named functions132100.00%
▷ Anonymous functions00.00%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/product-delivery-date.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%