10% appointment-booking-calendar

Code Review | Appointment Booking Calendar

WordPress plugin Appointment Booking Calendar scored 10% from 54 tests.

About plugin

  • Plugin page: appointment-booki...
  • Plugin version: 1.3.66
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-5.9
  • WordPress version: 5.9.2
  • First release: Nov 22, 2012
  • Latest release: Mar 4, 2022
  • Number of updates: 558
  • Update frequency: every 6.1 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

86 reviews

Install metrics

4,000+ active / 401,017 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/appointment-booking-calendar/cpabc_appointments.php+65
    Undefined variable: wpdb

Server metrics [RAM: ▲0.42MB] [CPU: ▼337.78ms] Passed 4 tests

Server-side resources used by Appointment Booking Calendar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5057.68 ▼17.33
Dashboard /wp-admin3.86 ▲0.4538.67 ▲2.96
Posts /wp-admin/edit.php4.09 ▲0.44100.85 ▲60.38
Add New Post /wp-admin/post-new.php7.32 ▲0.3594.55 ▼1,338.27
Media Library /wp-admin/upload.php3.74 ▲0.4428.52 ▲1.51

Server storage [IO: ▲2.72MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 256 new files
Database: 4 new tables, 3 new options
New tables
wp_cpabc_appointment_calendars
wp_cpabc_appointments
wp_cpabc_appointment_calendars_data
wp_cpabc_appointments_discount_codes
New WordPress options
ABC_RCODE
installed_appointment-booking-calendar
CP_ABC_JS

Browser metrics Passed 4 tests

Checking browser requirements for Appointment Booking Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,849 ▲12715.81 ▲0.666.00 ▼0.212.07 ▼0.45
Dashboard /wp-admin2,947 ▲896.13 ▼0.14138.54 ▼12.47171.49 ▲9.57
Posts /wp-admin/edit.php2,746 ▲523.23 ▼0.0065.49 ▼0.91143.34 ▼5.31
Add New Post /wp-admin/post-new.php1,697 ▲716.17 ▼4.74445.63 ▲8.17161.62 ▼5.00
Media Library /wp-admin/upload.php1,754 ▲565.46 ▼0.07148.52 ▼18.42189.12 ▼4.96
Upgrade /wp-admin/cpabc_appointments.php?page=cpabc_appointments_upgrade260.940.0324.82
Appointment Booking Calendar /wp-admin/cpabc_appointments.php260.940.0315.86
Manage Calendars /wp-admin/cpabc_appointments.php?page=cpabc_appointments260.940.0414.98
Help: Online demo /wp-admin/cpabc_appointments.php?page=cpabc_appointments_demo260.940.0314.83
I Need Help /wp-admin/cpabc_appointments.php?page=cpabc_appointments_support260.940.0315.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie tables were found after uninstall: 4 tables
    • wp_cpabc_appointments
    • wp_cpabc_appointments_discount_codes
    • wp_cpabc_appointment_calendars
    • wp_cpabc_appointment_calendars_data
  • This plugin does not fully uninstall, leaving 3 options in the database
    • installed_appointment-booking-calendar
    • ABC_RCODE
    • CP_ABC_JS

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/appointment-booking-calendar/inc/cpabc_scheduler.inc.php
    • > /wp-content/plugins/appointment-booking-calendar/inc/cpabc_apps_on.inc.php
    • > /wp-content/plugins/appointment-booking-calendar/inc/cpabc_apps_go.inc.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/appointment-booking-calendar/inc/cp_admin_int_edition.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/appointment-booking-calendar/inc/cpabc_appointments_admin_int.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/appointment-booking-calendar/mv/calendar_schedule.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/appointment-booking-calendar/inc/cpabc_publish_wizzard.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/appointment-booking-calendar/cpabc_appointments.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/appointment-booking-calendar/inc/cpabc_appointments_admin_addbk.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/appointment-booking-calendar/inc/cpabc_appointments_admin_int_calendar_list.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/appointment-booking-calendar/inc/cpabc_appointments_admin_int_bookings_list.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/appointment-booking-calendar/controllers/elementor/elementorwidget_class.inc.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/appointment-booking-calendar/inc/banner.php:103

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/cpabc_appointments.php?page=cpabc_appointments_upgrade
    • > Network (severe)
    wp-admin/cpabc_appointments.php?page=cpabc_appointments_upgrade - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/cpabc_appointments.php
    • > Network (severe)
    wp-admin/cpabc_appointments.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/cpabc_appointments.php?page=cpabc_appointments
    • > Network (severe)
    wp-admin/cpabc_appointments.php?page=cpabc_appointments - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/cpabc_appointments.php?page=cpabc_appointments_demo
    • > Network (severe)
    wp-admin/cpabc_appointments.php?page=cpabc_appointments_demo - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/cpabc_appointments.php?page=cpabc_appointments_support
    • > Network (severe)
    wp-admin/cpabc_appointments.php?page=cpabc_appointments_support - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (20 tag instead of maximum 10)
You can take inspiration from this readme.txt

appointment-booking-calendar/cpabc_appointments.php 92% from 13 tests

The main file in "Appointment Booking Calendar" v. 1.3.66 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("appointment-booking-calendar.php" instead of "cpabc_appointments.php")

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
There were no executable files found in this plugin26,967 lines of code in 125 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript341,2211,30815,209
CSS166413423,946
PO File591,3571,7463,938
PHP167601613,874

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.42
Average class complexity4.50
▷ Minimum class complexity3.00
▷ Maximum class complexity6.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods981.82%
▷ Protected methods218.18%
▷ Private methods00.00%
Functions62
▷ Named functions62100.00%
▷ Anonymous functions00.00%
Constants121
▷ Global constants121100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
41 compressed PNG files occupy 0.20MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
TDE_AppCalendar/modern/cal-cancel-icon.png0.26KB0.30KB0.00%
TDE_AppCalendar/blue/sprite.png3.05KB3.04KB0.22%
mv/css/images/icons_white.png0.60KB0.48KB▼ 19.15%
TDE_AppCalendar/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png0.12KB0.16KB0.00%
TDE_AppCalendar/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png0.12KB0.15KB0.00%