79% booking-package

Code Review | Booking Package - Appointment Booking Calendar System

WordPress plugin Booking Package - Appointment Booking Calendar System scored 79% from 54 tests.

About plugin

  • Plugin page: booking-package
  • Plugin version: 1.5.16
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8
  • WordPress version: 5.8.1
  • First release: Feb 26, 2018
  • Latest release: Nov 15, 2021
  • Number of updates: 367
  • Update frequency: every 4.0 days
  • Top authors: masaakitanaka (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

8,000+ active / 261,504 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲3.53MB] [CPU: ▼119.17ms] Passed 4 tests

Analyzing server-side resources used by Booking Package - Appointment Booking Calendar System
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /6.68 ▲3.9661.89 ▲40.25
Dashboard /wp-admin6.70 ▲3.6484.74 ▲37.31
Posts /wp-admin/edit.php6.70 ▲3.5968.71 ▲22.98
Add New Post /wp-admin/post-new.php8.64 ▲3.20103.06 ▼560.44
Media Library /wp-admin/upload.php6.70 ▲3.7056.48 ▲23.49
Calendar Setting /wp-admin/admin.php?page=booking-package_schedule_page6.7080.91
Users /wp-admin/admin.php?page=booking-package_members_page6.70107.43
Report & Booking /wp-admin/admin.php?page=booking-package/index.php6.7262.06
General Setting /wp-admin/admin.php?page=booking-package_setting_page6.78116.45

Server storage [IO: ▲3.49MB] [DB: ▲0.04MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 48 new files
Database: 15 new tables, 23 new options
New tables
wp_booking_package_emailSetting
wp_booking_package_optionsForHotel
wp_booking_package_users
wp_booking_package_webhook
wp_booking_package_taxes
wp_booking_package_userPraivateData
wp_booking_package_subscriptions
wp_booking_package_calendarAccount
wp_booking_package_courseData
wp_booking_package_schedule
...
New WordPress options
booking_package_function_for_member
_booking-package_css_v
booking_package_db_version
booking_package_user_toolbar
booking_package_check_email_for_member
booking_package_home_path
booking_package_timezone
booking_package_visitors_registration_for_member
booking_package_email_title_from
booking_package_read_member_limit
...

Browser metrics Passed 4 tests

Booking Package - Appointment Booking Calendar System: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,932 ▲33616.15 ▲0.489.28 ▲0.4252.31 ▲7.69
Dashboard /wp-admin3,190 ▲2566.23 ▲0.23148.38 ▼3.00117.29 ▲11.54
Posts /wp-admin/edit.php2,812 ▲732.73 ▲0.0171.50 ▲0.9391.61 ▲5.95
Add New Post /wp-admin/post-new.php1,737 ▲12217.82 ▼4.09360.10 ▲71.14112.76 ▲8.76
Media Library /wp-admin/upload.php1,880 ▲1475.06 ▲0.07158.36 ▲13.58122.55 ▲2.56
Calendar Setting /wp-admin/admin.php?page=booking-package_schedule_page9,9132.9568.7770.89
Users /wp-admin/admin.php?page=booking-package_members_page1,8542.6459.9978.79
Report & Booking /wp-admin/admin.php?page=booking-package/index.php1,7092.5269.4688.09
General Setting /wp-admin/admin.php?page=booking-package_setting_page6,2083.4175.22121.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/booking-package/uninstall.php+7
    Constant BOOKING_PACKAGE_EXTENSION_URL already defined
  • The uninstall procedure has failed, leaving 16 options in the database
    • booking_package_function_for_member
    • _booking_package_expiration_date_for_subscriptions
    • booking_package_accept_contributors_as_users
    • booking_package_reject_non_membder
    • booking_package_visitors_registration_for_member
    • booking_package_user_toolbar
    • booking_package_check_email_for_member
    • _booking_package_customer_id_for_subscriptions
    • booking_package_accept_subscribers_as_users
    • booking_package_read_member_limit
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: There are too many tags (108 tag instead of maximum 10)
The official readme.txt might help

booking-package/index.php 92% from 13 tests

The principal PHP file in "Booking Package - Appointment Booking Calendar System" v. 1.5.16 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("booking-package.php" instead of "index.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected48,180 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1713,8862,65823,367
PHP107,5401,45716,046
CSS73,6163456,389
SVG1032,370
Markdown1207
JSON1001

PHP code 0% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,241)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity200.55
▷ Minimum class complexity1.00
▷ Maximum class complexity1,241.00
Average method complexity7.99
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods314
▷ Static methods00.00%
▷ Public methods30697.45%
▷ Protected methods00.00%
▷ Private methods82.55%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin