10% appointment-booking-calendar

Code Review | Appointment Booking Calendar

WordPress plugin Appointment Booking Calendar scored10%from 54 tests.

About plugin

  • Plugin page: appointment-booki...
  • Plugin version: 1.3.81
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-6.4
  • WordPress version: 6.3.1
  • First release: Nov 22, 2012
  • Latest release: Nov 6, 2023
  • Number of updates: 573
  • Update frequency: every 7.0 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

87 reviews

Install metrics

2,000+ active /434,319 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/appointment-booking-calendar/cpabc_appointments.php+65
    Undefined variable: wpdb

Server metrics [RAM: ▲0.45MB] [CPU: ▲2.72ms] Passed 4 tests

This is a short check of server-side resources used by Appointment Booking Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4543.69 ▲5.81
Dashboard /wp-admin3.76 ▲0.4647.54 ▲1.34
Posts /wp-admin/edit.php3.87 ▲0.5252.82 ▲3.76
Add New Post /wp-admin/post-new.php6.34 ▲0.4598.46 ▲10.52
Media Library /wp-admin/upload.php3.68 ▲0.4535.43 ▼0.03

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 256 new files
Database: 4 new tables, 9 new options
New tables
wp_cpabc_appointment_calendars
wp_cpabc_appointments_discount_codes
wp_cpabc_appointment_calendars_data
wp_cpabc_appointments
New WordPress options
can_compress_scripts
ABC_RCODE
widget_recent-comments
installed_appointment-booking-calendar
theysaidso_admin_options
widget_recent-posts
CP_ABC_JS
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Appointment Booking Calendar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7114.07 ▼0.281.80 ▼0.1343.18 ▼2.38
Dashboard /wp-admin2,241 ▲615.59 ▼0.0387.00 ▼4.1138.15 ▼1.90
Posts /wp-admin/edit.php2,146 ▲461.94 ▲0.0039.42 ▼2.0637.00 ▲0.81
Add New Post /wp-admin/post-new.php6,233 ▲4,70421.45 ▼1.54945.01 ▲161.2765.85 ▲11.15
Media Library /wp-admin/upload.php1,446 ▲524.18 ▲0.0298.07 ▲0.5541.94 ▲0.01
Upgrade /wp-admin/cpabc_appointments.php?page=cpabc_appointments_upgrade260.410.1213.35
Manage Calendars /wp-admin/cpabc_appointments.php?page=cpabc_appointments260.410.137.02
Help: Online demo /wp-admin/cpabc_appointments.php?page=cpabc_appointments_demo260.410.095.86
Appointment Booking Calendar /wp-admin/cpabc_appointments.php260.410.076.80
I Need Help /wp-admin/cpabc_appointments.php?page=cpabc_appointments_support260.410.356.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_cpabc_appointment_calendars_data
    • wp_cpabc_appointments_discount_codes
    • wp_cpabc_appointments
    • wp_cpabc_appointment_calendars
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • CP_ABC_JS
    • ABC_RCODE
    • theysaidso_admin_options
    • installed_appointment-booking-calendar

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/appointment-booking-calendar/inc/cpabc_apps_go.inc.php
    • > /wp-content/plugins/appointment-booking-calendar/inc/cpabc_scheduler.inc.php
    • > /wp-content/plugins/appointment-booking-calendar/inc/cpabc_apps_on.inc.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > 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 get_option() in wp-content/plugins/appointment-booking-calendar/cpabc_appointments.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/appointment-booking-calendar/inc/cp-feedback.php:2
    • > 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 add_action() in wp-content/plugins/appointment-booking-calendar/controllers/elementor/cp-elementor-widget.inc.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/appointment-booking-calendar/inc/banner.php:103
    • > 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: 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: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/appointment-booking-calendar/controllers/elementor/elementorwidget_class.inc.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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?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
    • > 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_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 your attention:
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

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

The primary PHP file in "Appointment Booking Calendar" version 1.3.81 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file 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 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected27,121 lines of code in 125 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript341,2211,30815,211
PO File591,4081,7894,073
CSS166413423,946
PHP167601623,891

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No 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%
Functions63
▷ Named functions63100.00%
▷ Anonymous functions00.00%
Constants121
▷ Global constants121100.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
41 compressed PNG files occupy 0.20MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
TDE_AppCalendar/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png0.12KB0.15KB0.00%
TDE_AppCalendar/cupertino/images/ui-icons_3d80b3_256x240.png5.23KB4.11KB▼ 21.49%
TDE_AppCalendar/light/callt5.png0.36KB0.34KB▼ 4.63%
mv/css/images/icons_yellow.png0.60KB0.48KB▼ 19.15%
TDE_AppCalendar/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png0.14KB0.17KB0.00%