80% booking-activities

Code Review | Booking Activities

WordPress plugin Booking Activities scored80%from 54 tests.

About plugin

  • Plugin page: booking-activities
  • Plugin version: 1.15.15
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 25, 2017
  • Latest release: Oct 18, 2023
  • Number of updates: 1
  • Update frequency: every 365.0 days

Code review

54 tests

User reviews

103 reviews

Install metrics

5,000+ active /201,160 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.91MB] [CPU: ▲28.69ms] Passed 4 tests

Server-side resources used by Booking Activities
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.23 ▲4.7667.61 ▲32.53
Dashboard /wp-admin8.31 ▲5.0175.20 ▲24.79
Posts /wp-admin/edit.php8.36 ▲5.0184.31 ▲37.50
Add New Post /wp-admin/post-new.php10.83 ▲4.94108.88 ▲19.94
Media Library /wp-admin/upload.php8.17 ▲4.9476.42 ▲41.96
Bookings /wp-admin/admin.php?page=bookacti_bookings8.2869.30
Settings /wp-admin/admin.php?page=bookacti_settings8.6474.78
Home /wp-admin/admin.php?page=booking-activities8.2164.60
Booking forms /wp-admin/admin.php?page=bookacti_forms8.1757.84
Calendar editor /wp-admin/admin.php?page=bookacti_calendars8.6675.81

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 148 new files
Database: 14 new tables, 8 new options
New tables
wp_bookacti_activities
wp_bookacti_templates_activities
wp_bookacti_events
wp_bookacti_permissions
wp_bookacti_event_groups
wp_bookacti_templates
wp_bookacti_group_categories
wp_bookacti_booking_groups
wp_bookacti_form_fields
wp_bookacti_groups_events
...
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
bookacti-install-date
bookacti_version
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Booking Activities
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,073 ▲31214.62 ▲0.2725.94 ▲24.4340.15 ▼0.50
Dashboard /wp-admin2,230 ▲505.56 ▼0.0678.87 ▼9.3439.07 ▼2.21
Posts /wp-admin/edit.php2,141 ▲412.05 ▲0.0634.44 ▼2.6732.59 ▼2.54
Add New Post /wp-admin/post-new.php1,557 ▲3122.72 ▼0.26661.30 ▼2.5951.35 ▼1.44
Media Library /wp-admin/upload.php1,435 ▲354.24 ▼0.0595.01 ▼12.1343.05 ▼3.23
Bookings /wp-admin/admin.php?page=bookacti_bookings8511.347.2323.27
Settings /wp-admin/admin.php?page=bookacti_settings3,1863.6156.8840.99
Home /wp-admin/admin.php?page=booking-activities1,3243.2539.9677.42
Booking forms /wp-admin/admin.php?page=bookacti_forms8111.516.4824.34
Calendar editor /wp-admin/admin.php?page=bookacti_calendars5,3005.47162.1829.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 14 tables
    • wp_bookacti_bookings
    • wp_bookacti_activities
    • wp_bookacti_group_categories
    • wp_bookacti_groups_events
    • wp_bookacti_exports
    • wp_bookacti_templates_activities
    • wp_bookacti_booking_groups
    • wp_bookacti_permissions
    • wp_bookacti_meta
    • wp_bookacti_form_fields
    • ...
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • bookacti_version
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: booking, reservation, booking events, woocommerce booking, booking form

booking-activities/booking-activities.php 92% from 13 tests

The principal PHP file in "Booking Activities" v. 1.15.15 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.6" instead of "3.0")

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
Everything looks great! No dangerous files found in this plugin62,288 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript514,1264,95030,540
PHP456,8519,31429,915
CSS273181061,662
JSON100162
XML1008
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity90.50
▷ Minimum class complexity54.00
▷ Maximum class complexity127.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity78.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods44
▷ Static methods00.00%
▷ Public methods3375.00%
▷ Protected methods1022.73%
▷ Private methods12.27%
Functions910
▷ Named functions89898.68%
▷ Anonymous functions121.32%
Constants19
▷ Global constants19100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
14 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/jquery-ui/themes/booking-activities/images/ui-icons_418FB6_256x240.png4.51KB4.18KB▼ 7.28%
img/add-ons/points-of-sale.png13.61KB14.51KB0.00%
img/add-ons/prices-and-credits.png6.49KB6.90KB0.00%
lib/jquery-ui/themes/booking-activities/images/ui-icons_272727_256x240.png6.89KB4.18KB▼ 39.29%
img/add-ons/resource-availability.png9.20KB9.92KB0.00%