83% woocommerce-customer-delivery-date-time-selection

Code Review | Woocommerce Customer Delivery Date Time Selection

WordPress plugin Woocommerce Customer Delivery Date Time Selection scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-custo...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.0.0
  • WordPress version: 6.3.1
  • First release: May 23, 2015
  • Latest release: Sep 25, 2022
  • Number of updates: 43
  • Update frequency: every 62.4 days
  • Top authors: raficsedu (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

70+ active /9,197 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.41ms] Passed 4 tests

An overview of server-side resources used by Woocommerce Customer Delivery Date Time Selection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.31 ▲1.07
Dashboard /wp-admin3.36 ▲0.0148.18 ▼13.42
Posts /wp-admin/edit.php3.41 ▲0.0549.33 ▲0.12
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.58 ▼17.08
Media Library /wp-admin/upload.php3.28 ▲0.0535.34 ▲0.74

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options
wcd_date_time
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
wcd_settings
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommerce Customer Delivery Date Time Selection
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.67 ▲0.021.78 ▲0.0144.80 ▲7.63
Dashboard /wp-admin2,215 ▲245.74 ▲0.8496.22 ▼11.4940.14 ▼5.88
Posts /wp-admin/edit.php2,104 ▲152.05 ▲0.0441.51 ▲0.8634.77 ▼2.44
Add New Post /wp-admin/post-new.php1,546 ▲3223.13 ▲5.59656.13 ▼2.3350.07 ▼0.57
Media Library /wp-admin/upload.php1,394 ▲64.16 ▼0.0296.11 ▼1.2242.52 ▼0.66

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • wcd_date_time
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • wcd_settings
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/woocommerce-customer-delivery-date-time-selection/wcd_date_time_setings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-customer-delivery-date-time-selection/wcd_date_time.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: customer delivery date, checkout, order delivery, checkout calendar, woocommerce...

woocommerce-customer-delivery-date-time-selection/wcd_date_time.php 92% from 13 tests

Analyzing the main PHP file in "Woocommerce Customer Delivery Date Time Selection" version 1.1
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-customer-delivery-date-time-selection.php" instead of "wcd_date_time.php")

Code Analysis Passed 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 plugin352 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP26149330
JavaScript15115
CSS1007

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 2.64MB with 1.86MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-4.png2,584.42KB0.00KB▼ 100.00%
screenshot-3.png37.99KB15.55KB▼ 59.05%
screenshot-1.png34.38KB13.41KB▼ 61.01%
screenshot-2.png47.56KB18.56KB▼ 60.98%