68% appointment-hour-booking

Code Review | Appointment Hour Booking - WordPress Booking Plugin

WordPress plugin Appointment Hour Booking - WordPress Booking Plugin scored 68% from 54 tests.

About plugin

  • Plugin page: appointment-hour-...
  • Plugin version: 1.3.47
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-5.9
  • WordPress version: 5.9.2
  • First release: Dec 9, 2017
  • Latest release: Mar 23, 2022
  • Number of updates: 353
  • Update frequency: every 4.4 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

398 reviews

Install metrics

30,000+ active / 1,161,488 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.70MB] [CPU: ▼303.20ms] Passed 4 tests

Server-side resources used by Appointment Hour Booking - WordPress Booking Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.26 ▲0.7456.77 ▲6.40
Dashboard /wp-admin4.11 ▲0.7036.24 ▲4.40
Posts /wp-admin/edit.php4.33 ▲0.6940.02 ▲2.24
Add New Post /wp-admin/post-new.php7.64 ▲0.67101.74 ▼1,224.59
Media Library /wp-admin/upload.php4.05 ▲0.7629.85 ▲5.17
General Settings /wp-admin/admin.php?page=cp_apphourbooking_settings4.1135.06
Add Ons /wp-admin/admin.php?page=cp_apphourbooking_addons4.3628.96
Appointment Hour Booking /wp-admin/admin.php?page=cp_apphourbooking4.4630.64
Upgrade Plugin /wp-admin/admin.php?page=cp_apphourbooking_upgrade3.9326.00
Online Demo /wp-admin/admin.php?page=cp_apphourbooking_odemo3.9325.78
Appointment Hour Booking /wp-admin/options-general.php?page=cp_apphourbooking4.4630.54
I Need Help /wp-admin/admin.php?page=cp_apphourbooking_support3.9325.07

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 408 new files
Database: 2 new tables, 2 new options
New tables
wp_cpappbk_forms
wp_cpappbk_messages
New WordPress options
installed_appointment-hour-booking
cp_cpappb_last_verified

Browser metrics Passed 4 tests

An overview of browser requirements for Appointment Hour Booking - WordPress Booking Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,842 ▲8816.24 ▲0.566.32 ▼0.612.47 ▼0.03
Dashboard /wp-admin2,951 ▲906.14 ▼0.05117.94 ▼16.30149.10 ▼12.90
Posts /wp-admin/edit.php2,747 ▲563.25 ▲0.0061.27 ▼2.03141.04 ▲3.01
Add New Post /wp-admin/post-new.php1,722 ▼3016.30 ▼5.29410.36 ▼33.00165.25 ▲11.68
Media Library /wp-admin/upload.php1,754 ▲535.51 ▼0.00144.45 ▼1.86187.87 ▲1.96
General Settings /wp-admin/admin.php?page=cp_apphourbooking_settings2,5904.3574.15125.17
Add Ons /wp-admin/admin.php?page=cp_apphourbooking_addons2,0842.4455.80144.64
Appointment Hour Booking /wp-admin/admin.php?page=cp_apphourbooking1,2173.0476.27139.85
Upgrade Plugin /wp-admin/admin.php?page=cp_apphourbooking_upgrade3,5393.3979.46220.63
Online Demo /wp-admin/admin.php?page=cp_apphourbooking_odemo2,3703.1785.66245.70
Appointment Hour Booking /wp-admin/options-general.php?page=cp_apphourbooking1,2173.0369.68126.94
I Need Help /wp-admin/admin.php?page=cp_apphourbooking_support4,2713.9682.65206.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_cpappbk_messages
    • wp_cpappbk_forms
  • The uninstall procedure has failed, leaving 2 options in the database
    • cp_cpappb_last_verified
    • installed_appointment-hour-booking

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/appointment-hour-booking/js/fbuilder-loader-public.php
    • > /wp-content/plugins/appointment-hour-booking/cp-public-int.inc.php
    • > /wp-content/plugins/appointment-hour-booking/js/fbuilder-loader-admin.php
  • 79× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/appointment-hour-booking/controllers/elementor/cp-elementor-widget.inc.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/appointment-hour-booking/addons/smsbroadcast.addon.php:23
    • > PHP Notice
      Undefined index: cal in wp-content/plugins/appointment-hour-booking/cp-admin-int-message-list.inc.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/appointment-hour-booking/addons/square.addon.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/appointment-hour-booking/addons/twiliosms.addon.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/appointment-hour-booking/addons/sagepay.addon.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/appointment-hour-booking/addons/coupons.addon.php:25
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/appointment-hour-booking/cp-admin-int-message-list.inc.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/appointment-hour-booking/addons/credits-purchase.addon.php:23
    • > PHP Notice
      Undefined index: cal in wp-content/plugins/appointment-hour-booking/cp-admin-int-schedule.inc.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

appointment-hour-booking/app-booking-plugin.php 92% from 13 tests

"Appointment Hour Booking - WordPress Booking Plugin" version 1.3.47's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("appointment-hour-booking.php" instead of "app-booking-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin95,628 lines of code in 296 files:
LanguageFilesBlank linesComment linesLines of code
PO File6233,97529,63370,487
JavaScript1391,0871,16115,516
PHP821,6906957,945
CSS111281771,670
INI20010

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity10.97
▷ Minimum class complexity1.00
▷ Maximum class complexity497.00
Average method complexity4.74
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes63
▷ Abstract classes00.00%
▷ Concrete classes63100.00%
▷ Final classes00.00%
Methods154
▷ Static methods00.00%
▷ Public methods14292.21%
▷ Protected methods42.60%
▷ Private methods85.19%
Functions21
▷ Named functions2095.24%
▷ Anonymous functions14.76%
Constants49
▷ Global constants49100.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
31 PNG files occupy 0.17MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/cupertino/images/arrow.png0.28KB0.28KB0.00%
css/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png0.14KB0.17KB0.00%
css/cupertino/images/ui-bg_glass_80_eebd4d_1x400.png0.40KB0.17KB▼ 58.09%
mv/css/images/icons_yellow.png0.60KB0.48KB▼ 19.15%
mv/css/images/corner.png0.44KB0.32KB▼ 28.06%