67% get-bookings-wp

Code Review | GetBookingsWP - Appointments Booking Calendar Plugin For WordPress

WordPress plugin GetBookingsWP - Appointments Booking Calendar Plugin For WordPress scored67%from 54 tests.

About plugin

  • Plugin page: get-bookings-wp
  • Plugin version: 1.1.18
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 7, 2022
  • Latest release: Sep 24, 2023
  • Number of updates: 58
  • Update frequency: every 6.6 days
  • Top authors: istmoplugins (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,306 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.59MB] [CPU: ▲36.09ms] Passed 4 tests

Server-side resources used by GetBookingsWP - Appointments Booking Calendar Plugin For WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.68 ▲2.2181.23 ▲41.49
Dashboard /wp-admin6.02 ▲2.7288.54 ▲32.38
Posts /wp-admin/edit.php6.05 ▲2.6993.83 ▲41.75
Add New Post /wp-admin/post-new.php8.71 ▲2.82129.27 ▲28.74
Media Library /wp-admin/upload.php5.97 ▲2.7487.87 ▲52.79
Settings /wp-admin/admin.php?page=getbookingswp&tab=settings6.2298.50
Get Bookings Wp /wp-admin/admin.php?page=getbookingswp5.8685.66
Staff /wp-admin/admin.php?page=getbookingswp&tab=users5.8174.46
More Functionality! /wp-admin/admin.php?page=getbookingswp&tab=pro5.8266.80
Payment Gateways /wp-admin/admin.php?page=getbookingswp&tab=gateway5.9377.55
Custom Fields /wp-admin/admin.php?page=getbookingswp&tab=fields5.8574.87
Licensing /wp-admin/admin.php?page=getbookingswp&tab=licence5.8074.02
Services /wp-admin/admin.php?page=getbookingswp&tab=services5.8273.43
Calendar /wp-admin/admin.php?page=getbookingswp&tab=calendar5.8681.97
Notifications /wp-admin/admin.php?page=getbookingswp&tab=mail6.0380.47

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 283 new files
Database: 12 new tables, 10 new options
New tables
wp_getbwp_categories
wp_getbwp_filters
wp_getbwp_service_rates
wp_getbwp_filter_staff
wp_getbwp_booking_reservations
wp_getbwp_staff_availability
wp_getbwp_carts
wp_getbwp_staff_availability_breaks
wp_getbwp_bookings
wp_getbwp_service_variable_pricing
...
New WordPress options
db_upgraded
theysaidso_admin_options
getbwp_pro_active
can_compress_scripts
widget_theysaidso_widget
getbwp_profile_fields
widget_recent-comments
getbwp_business_hours
getbwp_options
widget_recent-posts

Browser metrics Passed 4 tests

GetBookingsWP - Appointments Booking Calendar Plugin For WordPress: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,208 ▲44715.91 ▲1.6314.19 ▲12.5234.60 ▼7.05
Dashboard /wp-admin2,393 ▲2196.65 ▲1.06125.14 ▲23.6341.56 ▼2.04
Posts /wp-admin/edit.php2,304 ▲2043.49 ▲1.5558.01 ▲24.6148.16 ▲12.13
Add New Post /wp-admin/post-new.php1,539 ▲220.73 ▲2.53599.79 ▼60.0238.67 ▼25.52
Media Library /wp-admin/upload.php1,605 ▲2085.90 ▲1.71101.42 ▼2.4345.23 ▼0.40
Settings /wp-admin/admin.php?page=getbookingswp&tab=settings7,7863.4666.6585.44
Get Bookings Wp /wp-admin/admin.php?page=getbookingswp1,9877.24140.8891.97
Staff /wp-admin/admin.php?page=getbookingswp&tab=users1,2573.9470.1541.28
More Functionality! /wp-admin/admin.php?page=getbookingswp&tab=pro1,1303.7049.4737.89
Payment Gateways /wp-admin/admin.php?page=getbookingswp&tab=gateway1,2283.5543.5348.91
Custom Fields /wp-admin/admin.php?page=getbookingswp&tab=fields1,4863.8951.6552.28
Licensing /wp-admin/admin.php?page=getbookingswp&tab=licence1,0893.5146.3443.56
Services /wp-admin/admin.php?page=getbookingswp&tab=services1,3504.5582.3548.85
Calendar /wp-admin/admin.php?page=getbookingswp&tab=calendar2,2915.78169.0554.17
Notifications /wp-admin/admin.php?page=getbookingswp&tab=mail4,75915.83372.4254.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie tables detected upon uninstall: 12 tables
    • wp_getbwp_service_rates
    • wp_getbwp_filter_staff
    • wp_getbwp_staff_availability
    • wp_getbwp_service_variable_pricing
    • wp_getbwp_carts
    • wp_getbwp_booking_reservations
    • wp_getbwp_staff_availability_breaks
    • wp_getbwp_filters
    • wp_getbwp_categories
    • wp_getbwp_bookings_meta
    • ...
  • Zombie WordPress options detected upon uninstall: 10 options
    • can_compress_scripts
    • widget_recent-posts
    • getbwp_profile_fields
    • widget_theysaidso_widget
    • getbwp_business_hours
    • theysaidso_admin_options
    • getbwp_options
    • widget_recent-comments
    • getbwp_pro_active
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=getbookingswp&tab=users
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/get-bookings-wp/classes/user.php+1889
    Undefined variable: arr
    • > GET request to /wp-admin/admin.php?page=getbookingswp&tab=users
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/get-bookings-wp/classes/user.php+1945
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=getbookingswp&tab=fields
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/get-bookings-wp/classes/admin.php+1371
    Undefined index: getbwp_custom_form
    • > GET request to /wp-admin/admin.php?page=getbookingswp&tab=services
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/get-bookings-wp/classes/service.php+3381
    Trying to get property 'cate_name' of non-object

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
Please fix the following
  • 47× 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 _e() in wp-content/plugins/get-bookings-wp/admin/tabs/help.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/get-bookings-wp/index.php:13
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/get-bookings-wp/classes/order.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_remote_post() in wp-content/plugins/get-bookings-wp/admin/tabs/addons.php:6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_option() on null in wp-content/plugins/get-bookings-wp/admin/tabs/orders.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GetBookingsWPCommon' not found in wp-content/plugins/get-bookings-wp/classes/messaging.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/get-bookings-wp/admin/tabs/gateway.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/get-bookings-wp/classes/adminshortcodes.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/get-bookings-wp/templates/appointment_side_bar.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/get-bookings-wp/admin/tabs/mail.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Booking Calendar), #2 (Staff Backend), #3 (Custom Booking Form Fields), #4 (Clean and Clear Booking Form), #5 (Multiple Services), #6 (Public Staff Profile), #7 (Members Directory)
The official readme.txt is a good inspiration

get-bookings-wp/index.php 85% from 13 tests

The main PHP file in "GetBookingsWP - Appointments Booking Calendar Plugin For WordPress" ver. 1.1.18 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 273 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("get-bookings-wp.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin49,191 lines of code in 172 files:
LanguageFilesBlank linesComment linesLines of code
PHP458,3881,03515,934
JavaScript582,7052,09612,562
CSS181,82331710,168
SVG4003,159
Sass2350482,649
LESS2350642,635
PO File18931,1302,084

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 135)
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity92.19
▷ Minimum class complexity1.00
▷ Maximum class complexity375.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity135.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods420
▷ Static methods10.24%
▷ Public methods420100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
72 PNG files occupy 1.15MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/Star.png4.04KB1.35KB▼ 66.63%
admin/images/info.png1.52KB1.49KB▼ 2.37%
admin/images/error.png1.38KB1.31KB▼ 5.30%
admin/images/private.png0.31KB0.39KB0.00%
templates/img/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%