74% wp-booking-system

Code Review | WP Booking System - Booking Calendar

WordPress plugin WP Booking System - Booking Calendar scored74%from 54 tests.

About plugin

  • Plugin page: wp-booking-system
  • Plugin version: 2.0.19.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Mar 5, 2014
  • Latest release: Nov 3, 2023
  • Number of updates: 137
  • Update frequency: every 25.8 days
  • Top authors: murgroland (59.12%)bryght (40.15%)iova.mihai (2.19%)

Code review

54 tests

User reviews

277 reviews

Install metrics

10,000+ active /221,627 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.79MB] [CPU: ▲13.82ms] Passed 4 tests

Analyzing server-side resources used by WP Booking System - Booking Calendar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.25 ▲1.7972.27 ▲35.27
Dashboard /wp-admin5.08 ▲1.7866.96 ▲16.85
Posts /wp-admin/edit.php5.20 ▲1.8458.45 ▲12.05
Add New Post /wp-admin/post-new.php7.68 ▲1.80111.52 ▲8.48
Media Library /wp-admin/upload.php5.02 ▲1.7953.34 ▲17.88
Settings /wp-admin/admin.php?page=wpbs-settings4.9946.24
Forms /wp-admin/admin.php?page=wpbs-forms4.9846.42
Backup/Restore /wp-admin/admin.php?page=wpbs-backup4.9842.85
Calendars /wp-admin/admin.php?page=wpbs-calendars4.9842.27

Server storage [IO: ▲1.87MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 397 new files
Database: 10 new tables, 10 new options
New tables
wp_wpbs_events
wp_wpbs_bookings
wp_wpbs_event_meta
wp_wpbs_booking_meta
wp_wpbs_legend_item_meta
wp_wpbs_legend_items
wp_wpbs_forms
wp_wpbs_calendars
wp_wpbs_form_meta
wp_wpbs_calendar_meta
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
wpbs_version
can_compress_scripts
wpbs_first_activation
db_upgraded
theysaidso_admin_options
widget_wpbs_widget
widget_wpbs_calendar

Browser metrics Passed 4 tests

An overview of browser requirements for WP Booking System - Booking Calendar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,991 ▲22913.95 ▼0.337.77 ▲5.9645.21 ▲1.44
Dashboard /wp-admin2,274 ▲975.22 ▼0.37104.83 ▼0.0138.96 ▼7.72
Posts /wp-admin/edit.php2,392 ▲2922.56 ▲0.6243.92 ▲7.8531.29 ▼1.93
Add New Post /wp-admin/post-new.php1,994 ▲46324.15 ▲1.19624.95 ▼9.5540.48 ▼16.81
Media Library /wp-admin/upload.php1,679 ▲2764.64 ▲0.5297.11 ▼5.1043.18 ▲0.25
Settings /wp-admin/admin.php?page=wpbs-settings1,5452.8158.7094.61
Forms /wp-admin/admin.php?page=wpbs-forms1,0522.4739.9329.88
Backup/Restore /wp-admin/admin.php?page=wpbs-backup9622.4339.4727.87
Calendars /wp-admin/admin.php?page=wpbs-calendars1,0522.5049.1430.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables detected upon uninstall: 10 tables
    • wp_wpbs_booking_meta
    • wp_wpbs_calendar_meta
    • wp_wpbs_forms
    • wp_wpbs_event_meta
    • wp_wpbs_calendars
    • wp_wpbs_bookings
    • wp_wpbs_form_meta
    • wp_wpbs_legend_items
    • wp_wpbs_legend_item_meta
    • wp_wpbs_events
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • wpbs_version
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_wpbs_calendar
    • widget_theysaidso_widget
    • wpbs_first_activation
    • db_upgraded
    • widget_wpbs_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-booking-system/includes/base/admin/booking/views/view-modal-booking-details.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-booking-system/includes/base/admin/calendar/views/view-shortcode-generator-insert-calendar.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/wp-booking-system/includes/base/admin/calendar/views/view-welcome-to-2.0.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-booking-system/includes/base/admin/form/views/view-edit-form-tab-form-confirmation.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-booking-system/includes/base/admin/booking/views/view-modal.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-booking-system/includes/base/admin/form/views/view-edit-form-tab-form-builder.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-booking-system/includes/base/admin/form/views/view-edit-form-tab-admin-notification.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-booking-system/includes/base/admin/booking/views/view-modal-manage-booking.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpbs_form_default_strings() in wp-content/plugins/wp-booking-system/includes/base/admin/form/views/view-edit-form-tab-form-strings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-booking-system/includes/base/admin/form/views/view-edit-form-tab-form-options.php:4

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 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (WP Booking System front-end display), #2 (Calendar Editor), #3 (Form Editor), #4 (Booking Manager), #5 (Email Notifications), #6 (Translations Manager)
You can look at the official readme.txt

wp-booking-system/wp-booking-system.php Passed 13 tests

The main PHP script in "WP Booking System - Booking Calendar" version 2.0.19.4 is automatically included on every request by WordPress
59 characters long description:
A set-and-forget booking calendar for your rental business.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin17,171 lines of code in 129 files:
LanguageFilesBlank linesComment linesLines of code
PHP1044,2545,8968,587
JSON3004,983
JavaScript128667811,792
CSS94592141,775
SVG10034

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity16.65
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes46
▷ Abstract classes613.04%
▷ Concrete classes4086.96%
▷ Final classes00.00%
Methods307
▷ Static methods61.95%
▷ Public methods19764.17%
▷ Protected methods10835.18%
▷ Private methods20.65%
Functions166
▷ Named functions16398.19%
▷ Anonymous functions31.81%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
255 compressed PNG files occupy 0.39MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/flags/cs.png0.46KB0.61KB0.00%
assets/img/flags/sj.png0.50KB0.62KB0.00%
assets/img/flags/tj.png0.48KB0.58KB0.00%
assets/img/flags/me.png0.44KB0.68KB0.00%
assets/img/flags/mz.png0.57KB0.76KB0.00%