77% elex-choose-your-delivery-date

Code Review | ELEX WooCommerce Choose Your Delivery Date

WordPress plugin ELEX WooCommerce Choose Your Delivery Date scored77%from 54 tests.

About plugin

  • Plugin page: elex-choose-your-...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-6.4
  • WordPress version: 6.3.1
  • First release: May 5, 2021
  • Latest release: Nov 8, 2023
  • Number of updates: 20
  • Update frequency: every 45.9 days
  • Top authors: elextensions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,890 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by ELEX WooCommerce Choose Your Delivery Date
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.34 ▼7.43
Dashboard /wp-admin3.34 ▲0.0445.69 ▼6.82
Posts /wp-admin/edit.php3.39 ▲0.0451.50 ▲4.28
Add New Post /wp-admin/post-new.php5.93 ▲0.0597.22 ▲8.61
Media Library /wp-admin/upload.php3.27 ▲0.0436.57 ▲0.44

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
elex-choose-your-delivery-date/elex-woocommerce-choose-your-delivery-date.php_activation_date
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

ELEX WooCommerce Choose Your Delivery Date: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,128 ▲34113.52 ▼0.659.65 ▲7.6638.38 ▼6.21
Dashboard /wp-admin2,418 ▲2545.56 ▼0.0295.84 ▼15.1148.06 ▲5.57
Posts /wp-admin/edit.php2,330 ▲2302.13 ▲0.1541.09 ▲1.4542.58 ▲4.38
Add New Post /wp-admin/post-new.php1,752 ▲22623.24 ▲0.16676.66 ▲68.7954.12 ▲2.18
Media Library /wp-admin/upload.php1,629 ▲2294.30 ▲0.10101.07 ▼7.2950.64 ▲8.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • elex-choose-your-delivery-date/elex-woocommerce-choose-your-delivery-date.php_activation_date
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/elex-choose-your-delivery-date/includes/market.php
    • > /wp-content/plugins/elex-choose-your-delivery-date/review_and_troubleshoot_notify/resources/logo.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-choose-your-delivery-date/review_and_troubleshoot_notify/resources/review.php:58
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/elex-choose-your-delivery-date/elex-woocommerce-choose-your-delivery-date.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elex-choose-your-delivery-date/includes/market.php:299
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/elex-choose-your-delivery-date/elex-woocommerce-choose-your-delivery-date.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-choose-your-delivery-date/review_and_troubleshoot_notify/resources/troubleshoot.php:59
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/elex-choose-your-delivery-date/elex-woocommerce-choose-your-delivery-date.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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:
  • Donate link: Invalid url: ""
The official readme.txt might help

elex-choose-your-delivery-date/elex-woocommerce-choose-your-delivery-date.php 77% from 13 tests

The primary PHP file in "ELEX WooCommerce Choose Your Delivery Date" version 1.2.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("elex-choose-your-delivery-date.php" instead of "elex-woocommerce-choose-your-delivery-date.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "2.6.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,993 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP691481,154
CSS4034818
JavaScript23121

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1794.44%
▷ Anonymous functions15.56%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.57MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/Advanced-Bulk-Edit.png69.40KB15.94KB▼ 77.03%
resources/images/WSDesk-Helpdesk.png161.93KB43.90KB▼ 72.89%
resources/images/Catalog-Mode.png85.64KB21.17KB▼ 75.28%
resources/images/Request-a-Quote.png92.71KB24.02KB▼ 74.09%
resources/images/Google-Shopping-Feeds.png80.41KB19.81KB▼ 75.37%