78% delivery-times-for-woocommerce

Code Review | Delivery Times for WooCommerce

WordPress plugin Delivery Times for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: delivery-times-fo...
  • Plugin version: 1.8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Jun 16, 2019
  • Latest release: Apr 20, 2022
  • Number of updates: 22
  • Update frequency: every 47.2 days
  • Top authors: deviodigital (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /16,492 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼1.84ms] Passed 4 tests

Analyzing server-side resources used by Delivery Times for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2128.97 ▼20.48
Dashboard /wp-admin3.66 ▲0.3557.38 ▲9.50
Posts /wp-admin/edit.php3.71 ▲0.3552.83 ▲3.71
Add New Post /wp-admin/post-new.php6.15 ▲0.27108.61 ▲3.96
Media Library /wp-admin/upload.php3.49 ▲0.2740.35 ▲5.45
Delivery Times /wp-admin/admin.php?page=dtwc_settings3.4937.94

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
dtwc_advanced
theysaidso_admin_options
widget_recent-comments
dtwc_business
dtwc_basic
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Delivery Times for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,617 ▼14015.09 ▲0.720.54 ▼2.1018.17 ▼26.74
Dashboard /wp-admin2,358 ▲1676.61 ▲1.74119.54 ▲18.0638.98 ▲0.42
Posts /wp-admin/edit.php2,270 ▲1813.56 ▲1.5255.66 ▲20.6929.62 ▼5.97
Add New Post /wp-admin/post-new.php1,683 ▲15022.20 ▼0.84583.69 ▼19.7243.32 ▼6.47
Media Library /wp-admin/upload.php1,403 ▲214.31 ▲0.1982.25 ▼19.0745.23 ▲4.30
Delivery Times /wp-admin/admin.php?page=dtwc_settings1,3303.5447.2326.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • dtwc_advanced
    • widget_recent-posts
    • db_upgraded
    • dtwc_business
    • dtwc_basic

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/delivery-times-for-woocommerce/admin/partials/dtwc-admin-display.php
    • > /wp-content/plugins/delivery-times-for-woocommerce/public/partials/dtwc-public-display.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/delivery-times-for-woocommerce/admin/dtwc-helper-functions.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/delivery-times-for-woocommerce/admin/dtwc-woocommerce-checkout.php:116
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/delivery-times-for-woocommerce/admin/dtwc-ddwc-settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/delivery-times-for-woocommerce/admin/dtwc-woocommerce-settings.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/delivery-times-for-woocommerce/admin/class-dtwc-admin-settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/delivery-times-for-woocommerce/admin/dtwc-admin-settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/delivery-times-for-woocommerce/delivery-times-for-woocommerce.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/delivery-times-for-woocommerce/uninstall.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: order-delivery, woocommerce, delivery, courier, delivery-times

delivery-times-for-woocommerce/delivery-times-for-woocommerce.php 92% from 13 tests

The primary PHP file in "Delivery Times for WooCommerce" version 1.8.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "3.5.0")

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 plugin2,902 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP184321,1441,173
CSS6367621,158
PO File3162168482
JavaScript2204084
Markdown1305

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.88
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods56
▷ Static methods23.57%
▷ Public methods5191.07%
▷ Protected methods00.00%
▷ Private methods58.93%
Functions30
▷ Named functions2996.67%
▷ Anonymous functions13.33%
Constants5
▷ Global constants5100.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
13 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
public/css/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
public/css/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
public/css/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
public/css/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%