77% pi-woocommerce-order-date-time-and-type

Code Review | Order date, Order pickup, Order date time, Pickup Location, delivery date for WooCommerce

WordPress plugin Order date, Order pickup, Order date time, Pickup Location, delivery date for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: pi-woocommerce-or...
  • Plugin version: 3.0.41
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.4.0
  • WordPress version: 6.3.1
  • First release: Oct 20, 2018
  • Latest release: Nov 23, 2023
  • Number of updates: 284
  • Update frequency: every 6.6 days
  • Top authors: rajeshsingh520 (100%)

Code review

54 tests

User reviews

84 reviews

Install metrics

900+ active /152,224 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.50ms] Passed 4 tests

Analyzing server-side resources used by Order date, Order pickup, Order date time, Pickup Location, delivery date for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.03 ▼6.18
Dashboard /wp-admin3.31 ▼0.0447.60 ▼14.28
Posts /wp-admin/edit.php3.36 ▲0.0048.64 ▼1.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.05 ▼11.68
Media Library /wp-admin/upload.php3.23 ▲0.0037.89 ▲0.02

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 89 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Order date, Order pickup, Order date time, Pickup Location, delivery date for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.29 ▼0.061.70 ▲0.0238.40 ▼1.03
Dashboard /wp-admin2,195 ▲215.58 ▲0.0594.18 ▼4.1742.40 ▼5.45
Posts /wp-admin/edit.php2,100 ▲31.94 ▲0.0139.14 ▼0.7335.03 ▲0.35
Add New Post /wp-admin/post-new.php1,529 ▲323.37 ▲0.27641.66 ▼37.7250.73 ▼5.91
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.1296.17 ▼3.4442.20 ▼0.64

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/pi-woocommerce-order-date-time-and-type/pi-woocommerce-order-date-time-and-type.php
    • > /wp-content/plugins/pi-woocommerce-order-date-time-and-type/include/pisol.class.form.php
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/pi-woocommerce-order-date-time-and-type/include/banner-sample.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/pi-woocommerce-order-date-time-and-type/admin/options-pickup.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pi-woocommerce-order-date-time-and-type/public/class-main.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/pi-woocommerce-order-date-time-and-type/admin/options-time.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pi-woocommerce-order-date-time-and-type/public/class-shipping-method.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pi-woocommerce-order-date-time-and-type/admin/menu.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pi_dtt_pro_check() in wp-content/plugins/pi-woocommerce-order-date-time-and-type/admin/options-limit.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pisol_dtt_get_setting() in wp-content/plugins/pi-woocommerce-order-date-time-and-type/public/class-woo-app.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pi_dtt_pro_check() in wp-content/plugins/pi-woocommerce-order-date-time-and-type/admin/options-time-slot.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pi-woocommerce-order-date-time-and-type/include/includes.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: These screenshots need descriptions #1, #10, #11, #12, #13, #14, #15, #16, #17, #19, #2, #20, #21, #22, #23, #3, #4, #6, #7, #9 in pi-woocommerce-order-date-time-and-type/assets to your readme.txt
You can take inspiration from this readme.txt

pi-woocommerce-order-date-time-and-type/pi-woocommerce-order-date-time-and-type.php 85% from 13 tests

The entry point to "Order date, Order pickup, Order date time, Pickup Location, delivery date for WooCommerce" version 3.0.41 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 90 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin15,899 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
CSS52,1127310,630
PHP339631633,572
SVG4341,036
JavaScript813230636
XML10025

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity19.90
▷ Minimum class complexity2.00
▷ Maximum class complexity70.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes00.00%
Methods214
▷ Static methods3717.29%
▷ Public methods214100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions857.14%
▷ Anonymous functions642.86%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
34 PNG files occupy 1.10MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/ui-icons_228ef1_256x240.png4.49KB4.18KB▼ 6.89%
admin/css/images/ui-icons_bbbbbb_256x240.png6.91KB4.18KB▼ 39.46%
admin/css/images/ui-bg_diagonals-thick_20_666666_40x40.png0.34KB0.15KB▼ 55.27%
admin/css/images/ui-icons_ededed_256x240.png6.83KB4.18KB▼ 38.76%
admin/css/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png0.28KB0.10KB▼ 63.57%