68% easy-product-delivery-date

Code Review | Easy Product Delivery Date

WordPress plugin Easy Product Delivery Date scored68%from 54 tests.

About plugin

  • Plugin page: easy-product-deli...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6.2
  • WordPress version: 6.3.1
  • First release: Mar 6, 2021
  • Latest release: Mar 6, 2021
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: rabiulislamrobi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /619 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼13.53ms] Passed 4 tests

Server-side resources used by Easy Product Delivery Date
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0428.44 ▼15.04
Dashboard /wp-admin3.36 ▲0.0643.42 ▼5.73
Posts /wp-admin/edit.php3.41 ▲0.0544.81 ▼4.81
Add New Post /wp-admin/post-new.php5.96 ▲0.0782.51 ▼28.53
Media Library /wp-admin/upload.php3.28 ▲0.0535.77 ▲3.14

Server storage [IO: ▲2.69MB] [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: 1,037 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
woopdd_is_installed
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Product Delivery Date
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,481 ▼29013.56 ▼0.990.63 ▼1.4418.75 ▼24.44
Dashboard /wp-admin2,222 ▲344.85 ▼0.04109.16 ▲6.9338.24 ▼3.89
Posts /wp-admin/edit.php2,105 ▲132.01 ▼0.0139.17 ▼0.9934.17 ▼2.21
Add New Post /wp-admin/post-new.php1,546 ▲1823.28 ▼0.11672.27 ▼2.0072.69 ▼3.29
Media Library /wp-admin/upload.php1,407 ▲224.18 ▼0.0196.01 ▼6.0646.39 ▼1.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • woopdd_is_installed

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
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/easy-product-delivery-date/vendor/symfony/translation/Resources/bin/translation-status.php
  • 102× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Exception\\ExceptionInterface' not found in wp-content/plugins/easy-product-delivery-date/vendor/symfony/translation/Exception/LogicException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Dumper\\FileDumper' not found in wp-content/plugins/easy-product-delivery-date/vendor/symfony/translation/Dumper/CsvFileDumper.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Loader\\LoaderInterface' not found in wp-content/plugins/easy-product-delivery-date/vendor/symfony/translation/Loader/ArrayLoader.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Loader\\FileLoader' not found in wp-content/plugins/easy-product-delivery-date/vendor/symfony/translation/Loader/CsvFileLoader.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Doctrine\\DBAL\\Types\\VarDateTimeImmutableType' not found in wp-content/plugins/easy-product-delivery-date/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Contracts\\Translation\\TranslatorInterface' not found in wp-content/plugins/easy-product-delivery-date/vendor/symfony/translation/DataCollectorTranslator.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Exception\\ExceptionInterface' not found in wp-content/plugins/easy-product-delivery-date/vendor/symfony/translation/Exception/InvalidArgumentException.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/easy-product-delivery-date/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Loader\\FileLoader' not found in wp-content/plugins/easy-product-delivery-date/vendor/symfony/translation/Loader/IniFileLoader.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\Exception' not found in wp-content/plugins/easy-product-delivery-date/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: shipping delivery date, delivery date, delivery date time, shipping date, easy product delivery...

easy-product-delivery-date/easy-product-delivery-date.php 92% from 13 tests

Analyzing the main PHP file in "Easy Product Delivery Date" version 1.0.0
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 173 characters long)

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Please fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/easy-product-delivery-date/vendor/bin/carbon.bat
      • wp-content/plugins/easy-product-delivery-date/vendor/nesbot/carbon/bin/carbon.bat
37,375 lines of code in 830 files:
LanguageFilesBlank linesComment linesLines of code
PHP8025,85023,87433,234
XSD392482,803
JSON700766
Markdown81490379
CSS311271
JavaScript371658
XML10046
Bourne Shell13110
DOS Batch2008

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 139)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity14.99
▷ Minimum class complexity1.00
▷ Maximum class complexity293.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity139.00
Code structure
Namespaces30
Interfaces23
Traits24
Classes116
▷ Abstract classes43.45%
▷ Concrete classes11296.55%
▷ Final classes65.36%
Methods1,489
▷ Static methods33522.50%
▷ Public methods1,31188.05%
▷ Protected methods986.58%
▷ Private methods805.37%
Functions267
▷ Named functions6122.85%
▷ Anonymous functions20677.15%
Constants93
▷ Global constants88.60%
▷ Class constants8591.40%
▷ Public constants85100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin