88% estimate-delivery-per-product-for-woocommerce

Code Review | Estimate delivery per Product for Woocommerce

WordPress plugin Estimate delivery per Product for Woocommerce scored 88% from 54 tests.

About plugin

  • Plugin page: estimate-delivery...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4
  • WordPress version: 6.3.1
  • First release: Aug 13, 2020
  • Latest release: Aug 13, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: danielflorea (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 2,048 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.52ms] Passed 4 tests

A check of server-side resources used by Estimate delivery per Product for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.09 ▼10.25
Dashboard /wp-admin3.31 ▲0.0145.50 ▼5.16
Posts /wp-admin/edit.php3.36 ▲0.0046.08 ▼2.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.84 ▼12.66
Media Library /wp-admin/upload.php3.23 ▲0.0036.46 ▲3.12

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Estimate delivery per Product for Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.194.31 ▲2.2441.05 ▼2.04
Dashboard /wp-admin2,203 ▲125.83 ▲0.90104.31 ▼3.1837.90 ▼4.11
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.1137.08 ▲0.9734.82 ▲0.87
Add New Post /wp-admin/post-new.php1,528 ▲923.25 ▼0.06649.14 ▼17.0060.14 ▼3.68
Media Library /wp-admin/upload.php1,391 ▲94.22 ▼0.0399.38 ▼11.7943.43 ▼3.43

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (General Settings), #2 (Next Day Delivery and Closing Time), #3 (Holiday Period), #4 (Display as a range in product page), #5 (Display Delivery date in mini cart), #6 (Display Delivery date in cart), #7 (Display Delivery date in checkout), #8 (Display Delivery date as a date format)
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

estimate-delivery-per-product-for-woocommerce/woo-estimate-delivery.php 77% from 13 tests

"Estimate delivery per Product for Woocommerce" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 158 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("estimate-delivery-per-product-for-woocommerce.php" instead of "woo-estimate-delivery.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin672 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7228619
CSS11448
JavaScript1005

PHP code Passed 2 tests

An overview 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.39
Average class complexity15.60
▷ Minimum class complexity2.00
▷ Maximum class complexity62.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.55MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/Screenshot_4.png119.84KB40.96KB▼ 65.82%
images/Screenshot_2.png45.39KB23.44KB▼ 48.36%
images/Screenshot_5.png135.78KB43.51KB▼ 67.95%
images/Screenshot_6.png32.68KB13.89KB▼ 57.49%
images/Screenshot_3.png21.46KB10.67KB▼ 50.28%