73% bp-order-date-time-for-woocommerce

Code Review | Order Delivery Date Time & Pickup for WooCommerce

WordPress plugin Order Delivery Date Time & Pickup for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: bp-order-date-tim...
  • Plugin version: 0.2
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.6-6.2
  • WordPress version: 6.3.1
  • First release: Aug 29, 2022
  • Latest release: Aug 10, 2023
  • Number of updates: 9
  • Update frequency: every 39.0 days
  • Top authors: niloybrightvessel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,770 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.74MB] [CPU: ▼29.82ms] Passed 4 tests

Analyzing server-side resources used by Order Delivery Date Time & Pickup for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2243.20 ▲1.79
Dashboard /wp-admin3.20 ▼0.1025.99 ▼29.86
Posts /wp-admin/edit.php3.20 ▼0.1527.28 ▼19.30
Add New Post /wp-admin/post-new.php3.20 ▼2.6830.60 ▼55.70
Media Library /wp-admin/upload.php3.20 ▼0.0326.78 ▼14.42

Server storage [IO: ▲1.96MB] [DB: ▲0.31MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 190 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Order Delivery Date Time & Pickup for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.25 ▲0.041.66 ▼0.1043.41 ▼2.64
Dashboard /wp-admin2,214 ▲345.56 ▼0.1393.64 ▼3.0566.90 ▲24.50
Posts /wp-admin/edit.php2,125 ▲251.99 ▼0.0439.02 ▲1.3133.48 ▼3.98
Add New Post /wp-admin/post-new.php1,697 ▲17121.78 ▼1.44763.30 ▲132.6463.51 ▲16.27
Media Library /wp-admin/upload.php1,413 ▲194.25 ▲0.08106.90 ▲8.4875.80 ▲35.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/bp-order-date-time-for-woocommerce/includes/core.php+21
    Use of undefined constant BV_BDFW_ASSETS - assumed 'BV_BDFW_ASSETS' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 fix the following
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Bright_Delivery_for_Woocommerce\\Base\\BaseController' not found in wp-content/plugins/bp-order-date-time-for-woocommerce/src/Pages/Settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-order-date-time-for-woocommerce/includes/core.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-order-date-time-for-woocommerce/includes/core.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Bright_Delivery_for_Woocommerce\\Base\\BaseController' not found in wp-content/plugins/bp-order-date-time-for-woocommerce/src/Base/SettingsLink.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Bright_Delivery_for_Woocommerce\\Base\\BaseController' not found in wp-content/plugins/bp-order-date-time-for-woocommerce/src/Pages/Checkout.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Bright_Delivery_for_Woocommerce\\Base\\BaseController' not found in wp-content/plugins/bp-order-date-time-for-woocommerce/src/Api/HandlerCallback.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Bright_Delivery_for_Woocommerce\\Base\\BaseController' not found in wp-content/plugins/bp-order-date-time-for-woocommerce/src/Pages/Order.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Bright_Delivery_for_Woocommerce\\Base\\BaseController' not found in wp-content/plugins/bp-order-date-time-for-woocommerce/src/Base/Enqueue.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Bright_Delivery_for_Woocommerce\\Base\\BaseController' not found in wp-content/plugins/bp-order-date-time-for-woocommerce/src/Pages/Email.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: order delivery date, pickup date, delivery date, delivery time

bp-order-date-time-for-woocommerce/main.php 69% from 13 tests

The entry point to "Order Delivery Date Time & Pickup for WooCommerce" version 0.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("bp-order-date-time-for-woocommerce.php" instead of "main.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "5.5.6")
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.4" instead of "7.2.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected40,052 lines of code in 162 files:
LanguageFilesBlank linesComment linesLines of code
PHP1103,7182,04116,286
JavaScript71,3094986,623
PO File203,1983,5916,500
Sass1697035,674
CSS53765194,875
JSON21092
SVG2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity21.71
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity6.10
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes80
▷ Abstract classes22.50%
▷ Concrete classes7897.50%
▷ Final classes11.28%
Methods326
▷ Static methods6519.94%
▷ Public methods32499.39%
▷ Protected methods00.00%
▷ Private methods20.61%
Functions28
▷ Named functions2692.86%
▷ Anonymous functions27.14%
Constants21
▷ Global constants29.52%
▷ Class constants1990.48%
▷ Public constants19100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/bp-logo-icon.png1.09KB0.87KB▼ 20.45%
includes/codestar/assets/images/checkerboard.png2.29KB2.54KB0.00%