68% booking-calendar

Code Review | Booking calendar, Appointment Booking System

WordPress plugin Booking calendar, Appointment Booking System scored 68% from 54 tests.

About plugin

  • Plugin page: booking-calendar
  • Plugin version: 3.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-5.8.2
  • WordPress version: 5.8.1
  • First release: Dec 13, 2015
  • Latest release: Nov 15, 2021
  • Number of updates: 581
  • Update frequency: every 3.7 days
  • Top authors: wpdevart (100%)

Code review

54 tests

User reviews

108 reviews

Install metrics

6,000+ active / 416,211 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.39MB] [CPU: ▼127.20ms] Passed 4 tests

Server-side resources used by Booking calendar, Appointment Booking System
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲1.3652.78 ▲13.91
Dashboard /wp-admin4.50 ▲1.4472.91 ▲28.46
Posts /wp-admin/edit.php4.54 ▲1.4449.55 ▲6.24
Add New Post /wp-admin/post-new.php6.78 ▲1.3599.95 ▼538.70
Media Library /wp-admin/upload.php4.43 ▲1.4343.14 ▲9.74
User Permissions /wp-admin/admin.php?page=wpdevart-user-permissions4.4647.83
Uninstall /wp-admin/admin.php?page=wpdevart-booking-uninstall4.4443.30
Forms /wp-admin/admin.php?page=wpdevart-forms4.5145.75
Featured plugins /wp-admin/admin.php?page=wpdevart-add-booking4.4439.58
Themes /wp-admin/admin.php?page=wpdevart-themes5.2650.53
Global Settings /wp-admin/admin.php?page=wpdevart-global-settings4.4643.33
Calendars /wp-admin/admin.php?page=wpdevart-calendars4.7041.13
Extras /wp-admin/admin.php?page=wpdevart-extras4.5143.22
Reservations /wp-admin/admin.php?page=wpdevart-reservations4.9151.18

Server storage [IO: ▲4.31MB] [DB: ▲0.02MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 219 new files
Database: 7 new tables, 1 new option
New tables
wp_wpdevart_reservations
wp_wpdevart_extras
wp_wpdevart_calendars
wp_wpdevart_payments
wp_wpdevart_themes
wp_wpdevart_dates
wp_wpdevart_forms
New WordPress options
widget_wpdevart_bc_widget

Browser metrics Passed 4 tests

Checking browser requirements for Booking calendar, Appointment Booking System
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,985 ▲38917.35 ▲1.7822.25 ▲13.6852.37 ▲8.14
Dashboard /wp-admin3,066 ▲1325.97 ▲0.04137.48 ▼10.47137.61 ▲24.35
Posts /wp-admin/edit.php2,845 ▲1062.75 ▲0.0372.24 ▲4.2689.27 ▼5.97
Add New Post /wp-admin/post-new.php1,689 ▼2,04822.12 ▲3.26287.83 ▼194.57120.01 ▲9.62
Media Library /wp-admin/upload.php1,854 ▲445.11 ▲0.09137.30 ▼20.33137.01 ▲29.66
User Permissions /wp-admin/admin.php?page=wpdevart-user-permissions2,0824.1376.97157.47
Uninstall /wp-admin/admin.php?page=wpdevart-booking-uninstall1,5474.1479.3787.36
Forms /wp-admin/admin.php?page=wpdevart-forms1,6264.1277.12129.01
Featured plugins /wp-admin/admin.php?page=wpdevart-add-booking1,8984.3482.89120.94
Themes /wp-admin/admin.php?page=wpdevart-themes1,6224.1381.48109.04
Global Settings /wp-admin/admin.php?page=wpdevart-global-settings1,6524.1387.51127.41
Calendars /wp-admin/admin.php?page=wpdevart-calendars1,3472.3854.2193.57
Extras /wp-admin/admin.php?page=wpdevart-extras1,6264.1281.31120.45
Reservations /wp-admin/admin.php?page=wpdevart-reservations1,8134.2483.20125.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 7 tables
    • wp_wpdevart_dates
    • wp_wpdevart_extras
    • wp_wpdevart_calendars
    • wp_wpdevart_reservations
    • wp_wpdevart_themes
    • wp_wpdevart_payments
    • wp_wpdevart_forms
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_wpdevart_bc_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/booking-calendar/booking_calendar.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/booking-calendar/includes/textfortr.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/booking-calendar/includes/widgets/widget-booking_calendar.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: appointment booking, booking calendar, booking system, reservation calendar, booking

booking-calendar/booking_calendar.php 92% from 13 tests

The main file in "Booking calendar, Appointment Booking System" v. 3.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("booking-calendar.php" instead of "booking_calendar.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin68,459 lines of code in 120 files:
LanguageFilesBlank linesComment linesLines of code
PO File4820,34124,57342,967
PHP3375121712,769
CSS74291126,967
JavaScript5134761,991
Sass1328241,560
LESS1328341,550
SVG100655

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 165)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity74.00
▷ Minimum class complexity1.00
▷ Maximum class complexity749.00
Average method complexity8.67
▷ Minimum method complexity1.00
▷ Maximum method complexity165.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes31
▷ Abstract classes00.00%
▷ Concrete classes31100.00%
▷ Final classes00.00%
Methods295
▷ Static methods5016.95%
▷ Public methods19265.08%
▷ Protected methods00.00%
▷ Private methods10334.92%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
43 PNG files occupy 0.35MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/hire_expert/6.png4.16KB2.67KB▼ 35.76%
css/images/extras.png0.95KB1.60KB0.00%
css/images/featured_plugins/vertical-menu.png6.36KB3.88KB▼ 39.03%
css/images/ui-icons_222222_256x240.png6.84KB4.18KB▼ 38.90%
css/images/arrow_up.png0.33KB0.45KB0.00%