89% woo-bookings-calendar

Code Review | WooCommerce Bookings Calendar

WordPress plugin WooCommerce Bookings Calendar scored 89% from 54 tests.

About plugin

  • Plugin page: woo-bookings-cale...
  • Plugin version: 1.0.36
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 12, 2019
  • Latest release: Jan 11, 2023
  • Number of updates: 54
  • Update frequency: every 25.9 days
  • Top authors: moiseh (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 34,176 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▼0.05ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Bookings Calendar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2042.12 ▼6.62
Dashboard /wp-admin3.56 ▲0.2550.66 ▼2.82
Posts /wp-admin/edit.php3.61 ▲0.2550.74 ▲7.37
Add New Post /wp-admin/post-new.php6.07 ▲0.1896.71 ▲1.98
Media Library /wp-admin/upload.php3.42 ▲0.1841.07 ▲7.27

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
wbc_notices
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Bookings Calendar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.501.76 ▼0.2040.78 ▼5.90
Dashboard /wp-admin2,206 ▲215.81 ▼0.0699.21 ▼6.6939.44 ▼5.20
Posts /wp-admin/edit.php2,092 ▲32.05 ▼0.0139.70 ▲4.4334.14 ▼1.54
Add New Post /wp-admin/post-new.php1,533 ▲1923.43 ▲5.76665.20 ▼20.0756.22 ▲0.20
Media Library /wp-admin/upload.php1,391 ▼04.21 ▲0.02104.74 ▲3.7945.95 ▲1.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • wbc_notices
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: reservation, calendar, woocommerce, booking, availability

woo-bookings-calendar/wbclite.php 85% from 13 tests

"WooCommerce Bookings Calendar" version 1.0.36's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "3.2")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-bookings-calendar.php" instead of "wbclite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,917 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP63511371,494
JavaScript45019238
CSS46249185

PHP code Passed 2 tests

Analyzing 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.34
Average class complexity33.00
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods87
▷ Static methods33.45%
▷ Public methods6271.26%
▷ Protected methods00.00%
▷ Private methods2528.74%
Functions21
▷ Named functions2095.24%
▷ Anonymous functions14.76%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
common/assets/alert.png0.42KB0.45KB0.00%
common/assets/youtube.png0.27KB0.22KB▼ 18.25%