78% product-delivery-date-time-for-woocommerce

Code Review | Product delivery date time for WooCommerce

WordPress plugin Product delivery date time for WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: product-delivery-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8.2
  • WordPress version: 6.3.1
  • First release: Nov 30, 2021
  • Latest release: Nov 30, 2021
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: byconsole (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 266 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.52ms] Passed 4 tests

An overview of server-side resources used by Product delivery date time for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.44 ▼1.92
Dashboard /wp-admin3.35 ▲0.0545.17 ▼2.44
Posts /wp-admin/edit.php3.40 ▲0.0543.46 ▼4.90
Add New Post /wp-admin/post-new.php5.95 ▲0.0793.75 ▲6.09
Media Library /wp-admin/upload.php3.28 ▲0.0534.57 ▲3.17
Compare Plugins /wp-admin/admin.php?page=byconsolewooptt_compare_plugins_settings3.2429.57
Holiday Settings /wp-admin/admin.php?page=byconsolewooptt_holiday_settings3.2432.74
WooPDT Lite /wp-admin/admin.php?page=byconsolewooptt_general_settings3.2432.99
Custom Modification Request /wp-admin/admin.php?page=byconsolewooptt_custom_modification_settings3.2429.99

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Product delivery date time for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲19413.76 ▼0.6410.29 ▲8.4142.69 ▼1.82
Dashboard /wp-admin2,252 ▲754.93 ▲0.06104.69 ▼1.2141.93 ▼9.06
Posts /wp-admin/edit.php2,137 ▲482.10 ▲0.0950.60 ▲8.6041.28 ▲3.49
Add New Post /wp-admin/post-new.php1,559 ▲4518.59 ▲0.89647.87 ▼16.1157.84 ▲0.61
Media Library /wp-admin/upload.php1,434 ▲434.24 ▲0.0596.03 ▼5.9042.16 ▼1.19
Compare Plugins /wp-admin/admin.php?page=byconsolewooptt_compare_plugins_settings1,1931.7126.6734.12
Holiday Settings /wp-admin/admin.php?page=byconsolewooptt_holiday_settings9231.7826.7726.97
WooPDT Lite /wp-admin/admin.php?page=byconsolewooptt_general_settings1,2181.7227.8122.81
Custom Modification Request /wp-admin/admin.php?page=byconsolewooptt_custom_modification_settings8881.7225.6327.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-delivery-date-time-for-woocommerce/inc/bycwoopdtt_compare_table.php:368
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-delivery-date-time-for-woocommerce/inc/bycwoopdtt_admin_settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-delivery-date-time-for-woocommerce/inc/bycwoopdtt_get_time_slot_list_by_date_using_ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/product-delivery-date-time-for-woocommerce/woocommerce/admin-product.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-delivery-date-time-for-woocommerce/inc/bycwoopdtt_modification_request_details.php:580
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-delivery-date-time-for-woocommerce/inc/bycwoopdtt_holiday_setting.php:172

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=byconsolewooptt_custom_modification_settings
    • > Javascript (severe) in unknown
    /wp-content/plugins/product-delivery-date-time-for-woocommerce/js/jquery-ui.multidatespicker.js?ver=6.3.1 480:35 Uncaught TypeError: Cannot read properties of undefined (reading 'multiDatesPicker')
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=byconsolewooptt_custom_modification_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).datepicker is not a function" "TypeError: jQuery(...).datepicker is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/product-delivery-date-time-for-woocommerce/js/admin-scripts.js?ver=6.3.1:25:52)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=byconsolewooptt_custom_modification_settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).datepicker is not a function
    • > GET request to /wp-admin/admin.php?page=byconsolewooptt_holiday_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $this.datepicker is not a function" "TypeError: $this.datepicker is not a function\n at HTMLInputElement.init (/wp-content/plugins/product-delivery-date-time-for-woocommerce/js/jquery-ui.multidatespicker.js?ver=6.3.1:154:12)\n at HTMLInputElement.\u003Canonymous> (/wp-content/plugins/product-delivery-date-time-for-woocommerce/js/jquery-ui.multidatespicker.js?ver=6.3.1:463:25)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:3129)\n at e.\u003Ccomputed>.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:1594)\n at $.fn.multiDatesPicker (/wp-content/plugins/product-delivery-date-time-for-woocommerce/js/jquery-ui.multidatespicker.js?ver=6.3.1:418:8)\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=byconsolewooptt_holiday_settings:164:57)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=byconsolewooptt_holiday_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $this.datepicker is not a function" "TypeError: $this.datepicker is not a function\n at HTMLInputElement.init (/wp-content/plugins/product-delivery-date-time-for-woocommerce/js/jquery-ui.multidatespicker.js?ver=6.3.1:154:12)\n at HTMLInputElement.\u003Canonymous> (/wp-content/plugins/product-delivery-date-time-for-woocommerce/js/jquery-ui.multidatespicker.js?ver=6.3.1:463:25)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:3129)\n at e.\u003Ccomputed>.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:1594)\n at $.fn.multiDatesPicker (/wp-content/plugins/product-delivery-date-time-for-woocommerce/js/jquery-ui.multidatespicker.js?ver=6.3.1:418:8)\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=byconsolewooptt_holiday_settings:193:50)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=byconsolewooptt_holiday_settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $this.datepicker is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Delivery date-time selection screen before entering for product details.), #2 (Pickup date selection calendar.), #3 (Time drop-down for pickup time selection.), #4 (Delivery date selection calendar), #5 (Delivery service time settings on wp-admin side.), #6 (Delivery date time on admin side order edit page), #7 (Delivery date time on customer's side order details page), #8 (Delivery date time on customer's email.)
Please take inspiration from this readme.txt

product-delivery-date-time-for-woocommerce/ByConsoleProduct_delivery_date_time.php 85% from 13 tests

The principal PHP file in "Product delivery date time for WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("product-delivery-date-time-for-woocommerce.php" instead of "ByConsoleProduct_delivery_date_time.php")
  • Description: The description should be shorter than 140 characters (currently 272 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin3,420 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS71,545681,468
PHP72,478401,388
JavaScript27644422
PO File157204142

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions42
▷ Named functions42100.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
27 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_cccccc_256x240.png6.81KB4.17KB▼ 38.71%
css/images/ui-bg_glass_20_555555_1x400.png0.25KB0.15KB▼ 40.38%
css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
css/images/ui-bg_flat_50_5c5c5c_40x100.png0.22KB0.08KB▼ 62.17%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%