68% advanced-booking-calendar

Code Review | Advanced Booking Calendar

WordPress plugin Advanced Booking Calendar scored 68% from 54 tests.

About plugin

  • Plugin page: advanced-booking-...
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-5.9
  • WordPress version: 5.9.2
  • First release: Apr 22, 2016
  • Latest release: Mar 17, 2022
  • Number of updates: 172
  • Update frequency: every 12.5 days
  • Top authors: BookingCalendar (100%)

Code review

54 tests

User reviews

45 reviews

Install metrics

5,000+ active / 123,845 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.49MB] [CPU: ▼290.37ms] 75% from 4 tests

This is a short check of server-side resources used by Advanced Booking Calendar
Please fix the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 649.16ms on /wp-admin/admin.php?page=advanced-booking-calendar-show-settings)
PageMemory (MB)CPU Time (ms)
Home /5.29 ▲1.7786.13 ▲29.26
Dashboard /wp-admin5.15 ▲1.7449.97 ▲11.66
Posts /wp-admin/edit.php5.38 ▲1.7451.88 ▲9.85
Add New Post /wp-admin/post-new.php7.69 ▲0.7270.08 ▼1,194.22
Media Library /wp-admin/upload.php5.10 ▲1.8038.88 ▲11.22
Seasons & Calendars /wp-admin/admin.php?page=advanced-booking-calendar-show-seasons-calendars5.0939.15
More Features /wp-admin/admin.php?page=advanced-booking-calendar-more-features5.0533.81
Extras /wp-admin/admin.php?page=advanced-booking-calendar-show-extras5.0735.71
Analytics /wp-admin/admin.php?page=advanced-booking-calendar-show-analytics5.0836.98
Bookings /wp-admin/admin.php?page=advanced_booking_calendar5.0948.21
Settings /wp-admin/admin.php?page=advanced-booking-calendar-show-settings5.58649.16

Server storage [IO: ▲3.02MB] [DB: ▲0.06MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 221 new files
Database: 8 new tables, 33 new options
New tables
wp_abc_seasons_assignment
wp_abc_booking_extras
wp_abc_requests
wp_abc_seasons
wp_abc_rooms
wp_abc_calendars
wp_abc_bookings
wp_abc_extras
New WordPress options
abc_feedbackModal01
abc_pluginversion
abc_text_rejected
abc_newsletter_100th_asked
widget_abcavailabilityformwidget
abc_accessLevel
abc_emailcopy
abc_dateformat
abc_bookingformvalidated
abc_paymentSettings
...

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Booking Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,849 ▲12716.26 ▲0.616.20 ▲0.092.53 ▼0.20
Dashboard /wp-admin2,948 ▲875.98 ▼0.25118.00 ▼22.90156.30 ▼10.59
Posts /wp-admin/edit.php2,742 ▲483.23 ▼0.0066.11 ▼0.99142.86 ▲0.26
Add New Post /wp-admin/post-new.php1,762 ▲10120.76 ▲4.85445.74 ▲24.75163.23 ▲7.11
Media Library /wp-admin/upload.php1,752 ▲545.50 ▲0.02144.66 ▲1.02190.05 ▼1.34
Seasons & Calendars /wp-admin/admin.php?page=advanced-booking-calendar-show-seasons-calendars2,1083.1076.75160.34
More Features /wp-admin/admin.php?page=advanced-booking-calendar-more-features1,7843.1071.27144.95
Extras /wp-admin/admin.php?page=advanced-booking-calendar-show-extras1,9392.9066.46189.30
Analytics /wp-admin/admin.php?page=advanced-booking-calendar-show-analytics1,4282.7754.69111.87
Bookings /wp-admin/admin.php?page=advanced_booking_calendar2,9623.2183.12222.69
Settings /wp-admin/admin.php?page=advanced-booking-calendar-show-settings3,9383.0979.36128.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall successfully, leaving 8 tables in the database
    • wp_abc_calendars
    • wp_abc_requests
    • wp_abc_booking_extras
    • wp_abc_seasons_assignment
    • wp_abc_bookings
    • wp_abc_seasons
    • wp_abc_rooms
    • wp_abc_extras
  • This plugin does not fully uninstall, leaving 34 options in the database
    • abc_currency
    • abc_customCss
    • abc_poweredby
    • abc_dateformat
    • widget_abcavailabilityformwidget
    • abc_usage
    • abc_subject_canceled
    • abc_cookies
    • abc_feedbackModal01
    • abc_subject_unconfirmed
    • ...

Smoke tests 50% from 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 50% from 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
The following issues need your attention
  • 12× 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 add_action() in wp-content/plugins/advanced-booking-calendar/functions.php:1198
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-booking-calendar/backend/bookings.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-booking-calendar/frontend/calendaroverview.php:173
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-booking-calendar/backend/extras.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-booking-calendar/frontend/singlecalendar.php:111
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-booking-calendar/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-booking-calendar/frontend/bookingform.php:372
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-booking-calendar/functions.php:1198
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-booking-calendar/backend/settings.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-booking-calendar/backend/seasons-calendars.php:54

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=advanced-booking-calendar-show-analytics
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: abc_graphData is not defined" "ReferenceError: abc_graphData is not defined\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/advanced-booking-calendar/backend/js/abc-analytics.js?ver=5.9.2:3:22)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/admin.php?page=advanced-booking-calendar-show-analytics
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught ReferenceError: abc_graphData is not defined

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
The official readme.txt might help

advanced-booking-calendar/advanced-booking-calendar.php Passed 13 tests

The main PHP file in "Advanced Booking Calendar" ver. 1.7.1 adds more information about the plugin and also serves as the entry point for this plugin
121 characters long description:
The Booking System that makes managing your online reservations easy. A great Booking Calendar plugin for Accommodations.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected28,852 lines of code in 192 files:
LanguageFilesBlank linesComment linesLines of code
PO File145,2466,99513,418
PHP175622088,104
JavaScript1464525594,884
CSS12266371,784
SVG300662

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions114
▷ Named functions114100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
frontend/css/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
frontend/css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
images/starting.png0.85KB1.22KB0.00%
frontend/css/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
frontend/css/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%