61% booking-ultra-pro

Code Review | Booking Ultra Pro Appointments Booking Calendar Plugin

WordPress plugin Booking Ultra Pro Appointments Booking Calendar Plugin scored 61% from 54 tests.

About plugin

  • Plugin page: booking-ultra-pro
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.3
  • WordPress version: 5.8.1
  • First release: Jan 6, 2016
  • Latest release: Jan 23, 2022
  • Number of updates: 157
  • Update frequency: every 14.1 days
  • Top authors: UsersUltra (85.99%)expresstech (14.65%)

Code review

54 tests

User reviews

229 reviews

Install metrics

2,000+ active / 150,584 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲2.52MB] [CPU: ▼97.60ms] Passed 4 tests

This is a short check of server-side resources used by Booking Ultra Pro Appointments Booking Calendar Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.95 ▲2.1261.21 ▲32.96
Dashboard /wp-admin5.70 ▲2.6379.64 ▲41.08
Posts /wp-admin/edit.php5.74 ▲2.6377.61 ▲37.39
Add New Post /wp-admin/post-new.php8.29 ▲2.85160.54 ▼501.21
Media Library /wp-admin/upload.php5.68 ▲2.6864.02 ▲40.47
Settings /wp-admin/admin.php?page=bookingultra-settings5.7985.48
Maintenance /wp-admin/admin.php?page=bup-maintenance5.5863.88
Custom Fields /wp-admin/admin.php?page=bookingultra-fields5.5666.39
Payments /wp-admin/admin.php?page=bookingultra-orders5.5864.83
Upgrade ➜ /wp-admin/admin.php?page=bookingultra-upgrade5.4761.11
Appointments /wp-admin/admin.php?page=bookingultra-appointments5.6068.14
Payment Gateways /wp-admin/admin.php?page=bookingultra-gateway5.6063.79
Booking Ultra /wp-admin/admin.php?page=bookingultra5.6375.65
Notifications /wp-admin/admin.php?page=bookingultra-mail5.8068.66
Staff /wp-admin/admin.php?page=bookingultra-users5.5868.21

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 341 new files
Database: 12 new tables, 4 new options
New tables
wp_bup_filter_staff
wp_bup_categories
wp_bup_services
wp_bup_bookings
wp_bup_orders
wp_bup_service_rates
wp_bup_carts
wp_bup_staff_availability_breaks
wp_bup_staff_availability
wp_bup_bookings_meta
...
New WordPress options
bup_pro_active
bup_options
bup_business_hours
bup_profile_fields

Browser metrics Passed 4 tests

This is an overview of browser requirements for Booking Ultra Pro Appointments Booking Calendar Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,091 ▲49019.53 ▲3.9119.07 ▲13.9177.42 ▲3.82
Dashboard /wp-admin3,137 ▲2448.48 ▲2.39187.48 ▲52.45207.35 ▲34.75
Posts /wp-admin/edit.php2,954 ▲2145.74 ▲2.5092.54 ▲30.24165.15 ▲30.41
Add New Post /wp-admin/post-new.php1,649 ▼2,08622.39 ▲3.85499.01 ▲31.47215.55 ▲50.62
Media Library /wp-admin/upload.php1,961 ▲2097.19 ▲1.63141.73 ▼5.08223.14 ▲37.17
Settings /wp-admin/admin.php?page=bookingultra-settings8,1976.12101.43192.85
Maintenance /wp-admin/admin.php?page=bup-maintenance1,3225.4083.15153.54
Custom Fields /wp-admin/admin.php?page=bookingultra-fields4,0325.7396.37144.29
Payments /wp-admin/admin.php?page=bookingultra-orders1,6775.5592.31152.94
Upgrade ➜ /wp-admin/admin.php?page=bookingultra-upgrade1,3824.90138.11189.79
Appointments /wp-admin/admin.php?page=bookingultra-appointments2,2156.48128.83162.65
Payment Gateways /wp-admin/admin.php?page=bookingultra-gateway1,7445.6389.87179.64
Booking Ultra /wp-admin/admin.php?page=bookingultra2,65210.25178.11292.50
Notifications /wp-admin/admin.php?page=bookingultra-mail5,97720.99409.06189.00
Staff /wp-admin/admin.php?page=bookingultra-users1,4146.20106.50136.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall successfully, leaving 12 tables in the database
    • wp_bup_bookings_meta
    • wp_bup_services
    • wp_bup_service_variable_pricing
    • wp_bup_carts
    • wp_bup_filters
    • wp_bup_staff_availability
    • wp_bup_categories
    • wp_bup_filter_staff
    • wp_bup_bookings
    • wp_bup_staff_availability_breaks
    • ...
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • bup_options
    • bup_profile_fields
    • bup_pro_active
    • bup_business_hours

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=bookingultra-fields
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/booking-ultra-pro/classes/bookingultra.admin.php+1654
    Undefined index: bup_custom_form
    • > GET request to /wp-admin/admin.php?page=bookingultra-users
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/booking-ultra-pro/classes/bookingultra.user.php+1989
    Undefined index: total

SRP 50% 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
  • 42× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/booking-ultra-pro/classes/bookingultra.paypal.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/booking-ultra-pro/admin/tabs/fields.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/booking-ultra-pro/classes/bookingultra.service.php:97
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/booking-ultra-pro/admin/tabs/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/booking-ultra-pro/admin/tabs/gateway.php:4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/booking-ultra-pro/addons/maintenance/admin/admin.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/booking-ultra-pro/admin/tabs/mail.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/booking-ultra-pro/classes/bookingultra.adminshortcodes.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/booking-ultra-pro/classes/bookingultra.shorcodes.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_one() on null in wp-content/plugins/booking-ultra-pro/admin/templates/edit_appointment.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=bookingultra-upgrade
    • > Javascript (severe) in unknown
    https://bookingultrapro.com/compare-packages.php?utm_source=free_plugin_sidebar - Access to script at 'https://kit.fontawesome.com/fefce96b21.js' from origin 'https://bookingultrapro.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/admin.php?page=bookingultra-upgrade
    • > Network (severe)
    https://kit.fontawesome.com/fefce96b21.js - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/admin.php?page=bookingultra-upgrade
    • > Security (severe) in unknown
    https://bookingultrapro.com/compare-packages.php?utm_source=free_plugin_sidebar - Refused to execute script from 'https://bookingultrapro.com/template/js/smooth-scroll.min.js.html' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (BOOKING STEP 1), #2 (BOOKING STEP 2), #3 (BOOKING STEP 3), #4 (BOOKING STEP 4), #6 (ADVANCED BOOKING CALENDAR), #7 (SERVICES), #8 (STAFF MEMBERS), #9 (CREATE SERVICES), #10 (SERVICES), #11 (PAYMENTS AND NOTES), #12 (SCHEDULE AND SERVICES)
  • Tags: There are too many tags (24 tag instead of maximum 10)
You can take inspiration from this readme.txt

booking-ultra-pro/index.php 85% from 13 tests

The main PHP script in "Booking Ultra Pro Appointments Booking Calendar Plugin" version 1.1.3 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("booking-ultra-pro.php" instead of "index.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 273 characters long)

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
There were no executable files found in this plugin58,980 lines of code in 176 files:
LanguageFilesBlank linesComment linesLines of code
PHP418,9351,25215,748
PO File65,1587,32812,505
JavaScript612,7692,24512,440
CSS191,5914339,685
SVG3003,158
Sass2249462,647
LESS2249622,633
HTML1260153
Markdown14011

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 136)
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity81.44
▷ Minimum class complexity1.00
▷ Maximum class complexity340.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity136.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods425
▷ Static methods10.24%
▷ Public methods42098.82%
▷ Protected methods00.00%
▷ Private methods51.18%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
108 PNG files occupy 1.63MB with 0.66MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-9.png25.03KB12.43KB▼ 50.32%
js/lightbox/img/prev.png1.33KB1.59KB0.00%
admin/images/iconos-panel-booking/staff-icon.png5.55KB2.94KB▼ 47.07%
screenshot-6.png26.30KB11.62KB▼ 55.82%
admin/images/iconos-panel-booking/groups-icon.png5.32KB2.76KB▼ 48.18%