63% bookit

Code Review | Booking Calendar | Appointment Booking | BookIt

WordPress plugin Booking Calendar | Appointment Booking | BookIt scored63%from 54 tests.

About plugin

  • Plugin page: bookit
  • Plugin version: 2.4.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Jan 31, 2019
  • Latest release: Oct 25, 2023
  • Number of updates: 76
  • Update frequency: every 22.8 days
  • Top authors: stylemix (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

10,000+ active /163,828 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲6.77MB] [CPU: ▲31.32ms] 50% from 4 tests

Analyzing server-side resources used by Booking Calendar | Appointment Booking | BookIt
It is recommended to improve the following
  • RAM: Total memory usage must be kept under 10MB (currently 10.69MB on /wp-admin/admin.php?page=freemius)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 6.77MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /10.23 ▲6.7775.53 ▲37.32
Dashboard /wp-admin10.69 ▲7.3481.41 ▲25.42
Posts /wp-admin/edit.php10.69 ▲7.3383.92 ▲40.18
Add New Post /wp-admin/post-new.php11.52 ▲5.63113.36 ▲22.34
Media Library /wp-admin/upload.php10.69 ▲7.4683.60 ▲47.08
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius10.6968.73

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 372 new files
Database: 10 new tables, 13 new options
New tables
wp_bookit_services
wp_bookit_discounts
wp_bookit_payments
wp_bookit_staff_services
wp_bookit_customers
wp_bookit_categories
wp_bookit_appointments
wp_bookit_staff
wp_bookit_coupons
wp_bookit_staff_working_hours
New WordPress options
widget_theysaidso_widget
bookit_settings
fs_accounts
widget_recent-comments
bookit_version
fs_active_plugins
widget_recent-posts
bookit_db_version
db_upgraded
notification_enqueue
...

Browser metrics Passed 4 tests

Booking Calendar | Appointment Booking | BookIt: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲15513.54 ▼0.811.65 ▲0.0531.75 ▼12.17
Dashboard /wp-admin2,292 ▲1186.09 ▲0.3997.25 ▲7.2483.49 ▲44.08
Posts /wp-admin/edit.php2,215 ▲1152.55 ▲0.5835.56 ▲1.3034.19 ▼0.19
Add New Post /wp-admin/post-new.php1,610 ▲8224.72 ▲1.59784.13 ▲134.0337.51 ▼14.31
Media Library /wp-admin/upload.php1,515 ▲1124.82 ▲0.59105.58 ▲6.2580.75 ▲34.06
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1612.3527.3325.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/bookit/libs/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The plugin did not uninstall successfully, leaving 10 tables in the database
    • wp_bookit_payments
    • wp_bookit_discounts
    • wp_bookit_services
    • wp_bookit_staff
    • wp_bookit_staff_working_hours
    • wp_bookit_customers
    • wp_bookit_categories
    • wp_bookit_appointments
    • wp_bookit_coupons
    • wp_bookit_staff_services
  • This plugin does not fully uninstall, leaving 13 options in the database
    • fs_debug_mode
    • widget_theysaidso_widget
    • bookit_settings
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • fs_accounts
    • bookit_db_version
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 36× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ANP\\Popup\\ItemBase' not found in wp-content/plugins/bookit/libs/admin-notifications-popup/classes/Popup/Theme/ItemRateTheme.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Bookit\\Classes\\Vendor\\DatabaseModel' not found in wp-content/plugins/bookit/includes/classes/database/Services.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Bookit\\Classes\\Vendor\\DatabaseModel' not found in wp-content/plugins/bookit/includes/classes/database/Staff_Services.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/bookit/templates/dashboard/bookit-staff.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/bookit/templates/dashboard/bookit-services.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Bookit\\Classes\\Vendor\\DatabaseModel' not found in wp-content/plugins/bookit/includes/classes/database/Customers.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Bookit\\Classes\\Base\\Addon' not found in wp-content/plugins/bookit/includes/classes/base/AddonsFactory.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Bookit\\Classes\\Admin\\DashboardController' not found in wp-content/plugins/bookit/includes/classes/admin/CategoriesController.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Bookit\\Classes\\Vendor\\DatabaseModel' not found in wp-content/plugins/bookit/includes/classes/database/Coupons.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ANP\\Popup\\ItemBase' not found in wp-content/plugins/bookit/libs/admin-notifications-popup/classes/Popup/Theme/ItemStarterTheme.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% 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
These attributes need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #10, #11, #12, #13, #14, #15, #16, #17, #18, #2, #3, #4, #5, #6, #7, #8, #9 in bookit/assets to your readme.txt
Please take inspiration from this readme.txt

bookit/bookit.php Passed 13 tests

The main PHP script in "Booking Calendar | Appointment Booking | BookIt" version 2.4.4 is automatically included on every request by WordPress
92 characters long description:
Booking Appointments Calendar. You can easily realize Booking Appointments with this plugin.

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
Good job! No executable or dangerous file extensions detected54,149 lines of code in 304 files:
LanguageFilesBlank linesComment linesLines of code
PHP1939,38318,50540,834
PO File175,6106,90412,341
SVG6700420
JavaScript75262314
Markdown1680214
CSS180018
JSON1008

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity47.12
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces11
Interfaces0
Traits0
Classes110
▷ Abstract classes76.36%
▷ Concrete classes10393.64%
▷ Final classes00.00%
Methods1,624
▷ Static methods49930.73%
▷ Public methods1,19473.52%
▷ Protected methods311.91%
▷ Private methods39924.57%
Functions136
▷ Named functions11282.35%
▷ Anonymous functions2417.65%
Constants162
▷ Global constants10967.28%
▷ Class constants5332.72%
▷ Public constants4992.45%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
libs/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/images/icon-100x100.png7.27KB2.73KB▼ 62.49%