72% product-delivery-date-for-woocommerce-lite

Code Review | Product Delivery Date for WooCommerce - Lite

WordPress plugin Product Delivery Date for WooCommerce - Lite scored72%from 54 tests.

About plugin

  • Plugin page: product-delivery-...
  • Plugin version: 2.7.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2015
  • Latest release: Dec 7, 2022
  • Number of updates: 67
  • Update frequency: every 38.3 days
  • Top authors: tychesoftwares (58.21%)MoxaJogani (37.31%)ashokrane (7.46%)

Code review

54 tests

User reviews

13 reviews

Install metrics

2,000+ active /42,384 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
The plugin installed gracefully, with no errors

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

Server-side resources used by Product Delivery Date for WooCommerce - Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.99 ▼4.61
Dashboard /wp-admin3.31 ▲0.0148.66 ▼0.92
Posts /wp-admin/edit.php3.36 ▲0.0151.19 ▲2.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0197.97 ▲3.57
Media Library /wp-admin/upload.php3.23 ▲0.0035.74 ▼3.00
Frequently Asked Questions for Product Delivery Date for WooCommerce - Lite /wp-admin/index.php?page=prdd_lite_faq_page3.0125.31

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 556 new files
Database: no new tables, 15 new options
New WordPress options
can_compress_scripts
prdd_lite_calendar_day
widget_theysaidso_widget
woocommerce_prdd_lite_db_version
widget_recent-comments
theysaidso_admin_options
prdd_lite_months
prdd_lite_date_format
db_upgraded
prdd_lite_global_holidays
...

Browser metrics Passed 4 tests

A check of browser resources used by Product Delivery Date for WooCommerce - Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.30 ▼1.082.03 ▲0.2342.43 ▼6.26
Dashboard /wp-admin2,206 ▲214.84 ▼1.03109.86 ▼5.4038.09 ▼5.56
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0239.99 ▲3.7435.05 ▲1.08
Add New Post /wp-admin/post-new.php1,536 ▲323.29 ▼0.04598.00 ▲4.3347.69 ▼11.57
Media Library /wp-admin/upload.php1,388 ▲64.20 ▲0.0393.87 ▼6.4044.18 ▲0.11
Frequently Asked Questions for Product Delivery Date for WooCommerce - Lite /wp-admin/index.php?page=prdd_lite_faq_page280.440.073.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 15 options in the database
    • prdd_lite_months
    • prdd_is_data_migrated
    • prdd_lite_language
    • theysaidso_admin_options
    • prdd_lite_date_format
    • woocommerce_prdd_lite_db_version
    • prdd_lite_enable_rounding
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/product-delivery-date-for-woocommerce-lite/includes/component/faq-support/templates/faq-page/faq-page.php
  • 72× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/product-delivery-date-for-woocommerce-lite/includes/component/faq-support/templates/faq-page/faq-page.php on line 69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/product-delivery-date-for-woocommerce-lite/templates/prdd-lite-delivery-settings-meta-box.php:24
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/product-delivery-date-for-woocommerce-lite/includes/component/faq-support/templates/faq-page/faq-page.php on line 103
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/product-delivery-date-for-woocommerce-lite/includes/component/faq-support/templates/faq-page/faq-page.php on line 103
    • > PHP Notice
      Undefined variable: ts_faq in wp-content/plugins/product-delivery-date-for-woocommerce-lite/includes/component/faq-support/templates/faq-page/faq-page.php on line 99
    • > PHP Notice
      Undefined variable: ts_faq in wp-content/plugins/product-delivery-date-for-woocommerce-lite/includes/component/faq-support/templates/faq-page/faq-page.php on line 103
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/product-delivery-date-for-woocommerce-lite/includes/component/faq-support/templates/faq-page/faq-page.php on line 99
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/product-delivery-date-for-woocommerce-lite/includes/prdd-lite-config.php:11
    • > PHP Notice
      Undefined variable: ts_faq in wp-content/plugins/product-delivery-date-for-woocommerce-lite/includes/component/faq-support/templates/faq-page/faq-page.php on line 69
    • > PHP Notice
      Undefined variable: ts_faq in wp-content/plugins/product-delivery-date-for-woocommerce-lite/includes/component/faq-support/templates/faq-page/faq-page.php on line 101

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/index.php?page=prdd_lite_faq_page
    • > Network (severe)
    wp-admin/index.php?page=prdd_lite_faq_page - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% 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
4 plugin tags: product delivery, product delivery date, delivery calendar, woocommerce order delivery

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

The main PHP file in "Product Delivery Date for WooCommerce - Lite" ver. 2.7.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("1.3" instead of "3.0.0")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin25,885 lines of code in 160 files:
LanguageFilesBlank linesComment linesLines of code
CSS531,3391,72814,942
PHP291,0661,7535,221
JavaScript761986975,062
PO File1233268659
Markdown1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity25.52
▷ Minimum class complexity1.00
▷ Maximum class complexity100.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods198
▷ Static methods12764.14%
▷ Public methods18794.44%
▷ Protected methods00.00%
▷ Private methods115.56%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
378 compressed PNG files occupy 1.16MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/themes/overcast/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
css/themes/dot-luv/images/ui-icons_9ccdfc_256x240.png5.23KB4.11KB▼ 21.49%
css/themes/black-tie/images/ui-bg_diagonals-thick_8_333333_40x40.png0.25KB0.15KB▼ 37.70%
css/themes/humanity/images/ui-bg_inset-soft_100_f4f0ec_1x100.png0.14KB0.17KB0.00%
images/theme_90_trontastic.png4.09KB4.08KB0.41%