78% booking-manager

Code Review | Booking Manager

WordPress plugin Booking Manager scored78%from 54 tests.

About plugin

  • Plugin page: booking-manager
  • Plugin version: 2.1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 31, 2010
  • Latest release: Dec 2, 2023
  • Number of updates: 117
  • Update frequency: every 41.7 days
  • Top authors: wpdevelop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active /109,126 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.90MB] [CPU: ▲10.34ms] Passed 4 tests

This is a short check of server-side resources used by Booking Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.08 ▲1.6149.55 ▲9.10
Dashboard /wp-admin5.31 ▲2.0060.71 ▲11.45
Posts /wp-admin/edit.php5.37 ▲2.0063.17 ▲12.51
Add New Post /wp-admin/post-new.php7.91 ▲2.0294.65 ▲8.30
Media Library /wp-admin/upload.php5.24 ▲2.0054.08 ▲19.89

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 132 new files
Database: no new tables, 17 new options
New WordPress options
can_compress_scripts
wpbm_menu_position
wpbm_time_format
wpbm_start_day_weeek
widget_recent-comments
theysaidso_admin_options
wpbm_is_hide_details
db_upgraded
widget_recent-posts
wpbm_is_not_load_bs_script_in_admin
...

Browser metrics Passed 4 tests

An overview of browser requirements for Booking Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15413.53 ▼0.738.11 ▲6.4840.32 ▼2.11
Dashboard /wp-admin2,195 ▲285.53 ▼0.0894.23 ▼13.7376.54 ▲31.92
Posts /wp-admin/edit.php2,118 ▲181.97 ▲0.0237.02 ▼0.5235.36 ▼0.09
Add New Post /wp-admin/post-new.php2,848 ▲1,32222.50 ▼0.96783.81 ▲177.1940.16 ▼13.32
Media Library /wp-admin/upload.php1,412 ▲94.19 ▼0.0598.37 ▲0.8371.60 ▲30.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 17 options in the database
    • wpbm_listing_template
    • wpbm_activation_process
    • wpbm_user_role_master
    • wpbm_is_not_load_bs_script_in_admin
    • wpbm_menu_position
    • can_compress_scripts
    • wpbm_time_format
    • wpbm_date_format
    • theysaidso_admin_options
    • widget_recent-comments
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 10× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/booking-manager/assets/libs/icalendar/examples/recurringdate.php
    • > /wp-content/plugins/booking-manager/assets/libs/icalendar/examples/timezoneevent.php
    • > /wp-content/plugins/booking-manager/assets/libs/icalendar/includes/ical.php
    • > /wp-content/plugins/booking-manager/assets/libs/icalendar/examples/simpleevent.php
    • > /wp-content/plugins/booking-manager/index.php
    • > /wp-content/plugins/booking-manager/assets/libs/icalendar/includes/framework.php
    • > /wp-content/plugins/booking-manager/assets/libs/icalendar/examples/parseicalendar.php
    • > /wp-content/plugins/booking-manager/assets/libs/icalendar/includes/timezone.php
    • > /wp-content/plugins/booking-manager/assets/libs/icalendar/includes/recurringdate.php
    • > /wp-content/plugins/booking-manager/assets/libs/icalendar/includes/date.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/booking-manager/assets/libs/icalendar/examples/parseicalendar.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'WPBM_JS_CSS' not found in wp-content/plugins/booking-manager/core/wpbm-js.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPBM_JS_CSS' not found in wp-content/plugins/booking-manager/core/wpbm-css.php:13
    • > PHP Notice
      Undefined variable: argv in wp-content/plugins/booking-manager/assets/libs/icalendar/examples/parseicalendar.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

booking-manager/index.php 92% from 13 tests

The primary PHP file in "Booking Manager" version 2.1.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("booking-manager.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin25,367 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
PHP554,3466,35912,301
CSS1712940810,509
JavaScript87804852,204
SVG100288
Markdown123059
HTML1006

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.39
Average class complexity24.97
▷ Minimum class complexity3.00
▷ Maximum class complexity141.00
Average method complexity3.51
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes29
▷ Abstract classes517.24%
▷ Concrete classes2482.76%
▷ Final classes416.67%
Methods286
▷ Static methods6121.33%
▷ Public methods26191.26%
▷ Protected methods20.70%
▷ Private methods238.04%
Functions199
▷ Named functions199100.00%
▷ Anonymous functions00.00%
Constants24
▷ Global constants24100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon-256x256.png1.54KB0.92KB▼ 40.15%
assets/img/icon-16x16.png0.66KB0.67KB0.00%