83% delivery-and-pickup-scheduling-for-woocommerce

Code Review | Delivery & Pickup Scheduling - DateTime Picker Plugin for WooCommerce - Checkout Calendar for WooCommerce

WordPress plugin Delivery & Pickup Scheduling - DateTime Picker Plugin for WooCommerce - Checkout Calendar for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: delivery-and-pick...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 20, 2023
  • Latest release: Oct 22, 2023
  • Number of updates: 21
  • Update frequency: every 13.2 days
  • Top authors: Uriahs Victor (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /2,488 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.41ms] Passed 4 tests

This is a short check of server-side resources used by Delivery & Pickup Scheduling - DateTime Picker Plugin for WooCommerce - Checkout Calendar for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.59 ▲3.27
Dashboard /wp-admin3.32 ▲0.0244.29 ▼4.95
Posts /wp-admin/edit.php3.37 ▲0.0246.25 ▲3.96
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.73 ▼5.27
Media Library /wp-admin/upload.php3.25 ▲0.0231.31 ▼2.68

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 1,429 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Delivery & Pickup Scheduling - DateTime Picker Plugin for WooCommerce - Checkout Calendar for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.75 ▲0.152.16 ▲0.6243.61 ▲2.41
Dashboard /wp-admin2,208 ▲315.55 ▼0.1485.30 ▼7.2740.53 ▲2.20
Posts /wp-admin/edit.php2,116 ▲162.00 ▼0.0040.11 ▲6.1636.69 ▼1.73
Add New Post /wp-admin/post-new.php1,543 ▲1718.51 ▼4.90603.70 ▼44.8364.44 ▲9.09
Media Library /wp-admin/upload.php1,413 ▲134.22 ▲0.13102.95 ▼6.4746.17 ▼2.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 134× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Extractor\\AbstractFileExtractor' not found in wp-content/plugins/delivery-and-pickup-scheduling-for-woocommerce/vendor/symfony/translation/Extractor/PhpExtractor.php:22
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/delivery-and-pickup-scheduling-for-woocommerce/vendor/symfony/polyfill-mbstring/bootstrap80.php on line 15
    • > PHP Fatal error
      Trait 'Carbon\\Traits\\Localization' not found in wp-content/plugins/delivery-and-pickup-scheduling-for-woocommerce/vendor/nesbot/carbon/src/Carbon/Traits/Options.php on line 27
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\CarbonInterface' not found in wp-content/plugins/delivery-and-pickup-scheduling-for-woocommerce/vendor/nesbot/carbon/src/Carbon/Carbon.php:510
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\CarbonConverterInterface' not found in wp-content/plugins/delivery-and-pickup-scheduling-for-woocommerce/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php:189
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\ServiceProvider' not found in wp-content/plugins/delivery-and-pickup-scheduling-for-woocommerce/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php:25
    • > PHP Fatal error
      Uncaught ReflectionException: Class Symfony\\Component\\Translation\\Formatter\\MessageFormatterInterface does not exist in wp-content/plugins/delivery-and-pickup-scheduling-for-woocommerce/vendor/nesbot/carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/delivery-and-pickup-scheduling-for-woocommerce/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Exception\\IncompleteDsnException' not found in wp-content/plugins/delivery-and-pickup-scheduling-for-woocommerce/vendor/symfony/translation/Exception/MissingRequiredOptionException.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Dumper\\FileDumper' not found in wp-content/plugins/delivery-and-pickup-scheduling-for-woocommerce/vendor/symfony/translation/Dumper/PoFileDumper.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
6 plugin tags: pickup, delivery plugin, timepicker, woocommerce, scheduling...

delivery-and-pickup-scheduling-for-woocommerce/delivery-and-pickup-scheduling.php 85% from 13 tests

The entry point to "Delivery & Pickup Scheduling - DateTime Picker Plugin for WooCommerce - Checkout Calendar for WooCommerce" version 1.2.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("delivery-and-pickup-scheduling-for-woocommerce.php" instead of "delivery-and-pickup-scheduling.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.7" instead of "3.0")

Code Analysis 95% from 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 plugin94,122 lines of code in 1,151 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,08117,76946,03682,882
PO File203,1983,5916,500
XSD392482,803
JSON200781
Markdown122350766
JavaScript103462227
CSS192117144
XML13016
SVG3003

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,088)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity25.42
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces48
Interfaces28
Traits29
Classes289
▷ Abstract classes196.57%
▷ Concrete classes27093.43%
▷ Final classes155.56%
Methods3,324
▷ Static methods70521.21%
▷ Public methods2,64979.69%
▷ Protected methods1534.60%
▷ Private methods52215.70%
Functions459
▷ Named functions21246.19%
▷ Anonymous functions24753.81%
Constants263
▷ Global constants11644.11%
▷ Class constants14755.89%
▷ Public constants14497.96%

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
8 PNG files occupy 0.71MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/delivery-and-pickup-scheduling-rtl.png176.64KB70.03KB▼ 60.36%
assets/admin/img/logo.png8.55KB2.63KB▼ 69.23%
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
lib/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
assets/admin/img/delivery-and-pickup-scheduling.png176.40KB69.68KB▼ 60.50%