89% woo-booking-bundle-hours

Code Review | WooCommerce Booking Bundle Hours

WordPress plugin WooCommerce Booking Bundle Hours scored89%from 54 tests.

About plugin

  • Plugin page: woo-booking-bundl...
  • Plugin version: 0.7.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 6, 2019
  • Latest release: Oct 11, 2023
  • Number of updates: 31
  • Update frequency: every 50.3 days
  • Top authors: cristiano.zanca (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active /4,975 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.88ms] Passed 4 tests

A check of server-side resources used by WooCommerce Booking Bundle Hours
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1741.62 ▲0.32
Dashboard /wp-admin3.33 ▲0.0350.28 ▲0.46
Posts /wp-admin/edit.php3.45 ▲0.0947.41 ▲0.53
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.94 ▼12.84
Media Library /wp-admin/upload.php3.25 ▲0.0340.56 ▲5.72
Booking Bundle Hours /wp-admin/admin.php?page=woo_booking_bundle_hours3.3135.27

Server storage [IO: ▲0.24MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: 1 new table, 8 new options
New tables
wp_bookingbundlehours
New WordPress options
woo_bbh_category
woo_booking_bundle_hours_db_version
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Booking Bundle Hours
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.47 ▲0.122.59 ▲0.9845.90 ▲3.94
Dashboard /wp-admin2,215 ▲385.56 ▼0.1583.49 ▼3.5238.89 ▼3.67
Posts /wp-admin/edit.php2,117 ▲171.99 ▲0.0137.68 ▲1.6233.28 ▼3.03
Add New Post /wp-admin/post-new.php1,540 ▲1223.43 ▲0.33666.90 ▲3.2159.33 ▲12.08
Media Library /wp-admin/upload.php1,417 ▲174.18 ▼0.0094.99 ▼5.2441.27 ▼1.89
Booking Bundle Hours /wp-admin/admin.php?page=woo_booking_bundle_hours1,1062.0727.3227.74

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
5 plugin tags: woocommerce, booking, hours, bundle, services

woo-booking-bundle-hours/woo-booking-bundle-hours.php 77% from 13 tests

The principal PHP file in "WooCommerce Booking Bundle Hours" v. 0.7.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "7.0")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 167 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected3,990 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42323171,866
CSS798541,353
PHP8549122771

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity4.40
▷ Minimum method complexity2.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
assets/css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
assets/css/images/ui-icons_cc0000_256x240.png4.57KB4.18KB▼ 8.43%
assets/css/images/ui-icons_ffffff_256x240.png6.33KB4.18KB▼ 33.99%
assets/css/images/ui-icons_777777_256x240.png6.94KB4.18KB▼ 39.78%