46% ultimate-appointment-scheduling

Code Review | Ultimate Appointment Booking & Scheduling

WordPress plugin Ultimate Appointment Booking & Scheduling scored46%from 54 tests.

About plugin

  • Plugin page: ultimate-appointm...
  • Plugin version: 2.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.4
  • WordPress version: 6.3.1
  • First release: Aug 28, 2015
  • Latest release: Nov 7, 2023
  • Number of updates: 129
  • Update frequency: every 23.2 days
  • Top authors: Rustaurius (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

200+ active /68,111 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼31.09ms] Passed 4 tests

Server-side resources used by Ultimate Appointment Booking & Scheduling
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.27 ▲0.8122.77 ▼17.08
Dashboard /wp-admin4.33 ▲1.0328.57 ▼27.56
Posts /wp-admin/edit.php4.33 ▲0.9831.81 ▼19.03
Add New Post /wp-admin/post-new.php4.33 ▼1.5629.59 ▼60.67
Media Library /wp-admin/upload.php4.33 ▲1.1034.03 ▼4.47
Add New /wp-admin/admin.php?page=ewd-uasp-add-edit-appointment4.3331.42
Dashboard /wp-admin/admin.php?page=ewd-uasp-dashboard4.3326.44
Export /wp-admin/admin.php?page=ewd-uasp-export4.3329.25
Import /wp-admin/admin.php?page=ewd-uasp-import4.3327.22
Service Providers /wp-admin/edit.php?post_type=uasp-provider4.3328.19
Ultimate Appointment Scheduling - Welcome! /wp-admin/index.php?page=ewd-uasp-getting-started4.3325.55
Appointments /wp-admin/admin.php?page=ewd-uasp-appointment-submenu4.3327.24
About Us /wp-admin/admin.php?page=ewd-uasp-about-us4.3324.59
Exceptions /wp-admin/edit.php?post_type=uasp-exception4.3328.14
Settings /wp-admin/admin.php?page=ewd-uasp-settings4.3325.80

Server storage [IO: ▲7.53MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 590 new files
Database: 2 new tables, 8 new options
New tables
wp_EWD_UASP_Appointments
wp_EWD_UASP_Custom_Fields_Meta
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
ewd-uasp-installation-time
widget_recent-comments
theysaidso_admin_options
ewd-uasp-permission-level

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ultimate Appointment Booking & Scheduling
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14414.35 ▼0.041.60 ▼0.3838.21 ▼6.34
Dashboard /wp-admin2,274 ▲945.65 ▼0.0193.22 ▼2.5441.43 ▲2.04
Posts /wp-admin/edit.php2,179 ▲762.00 ▼0.0041.36 ▼1.0736.60 ▼3.61
Add New Post /wp-admin/post-new.php6,428 ▲4,90227.61 ▲4.68915.39 ▲230.8536.62 ▼23.24
Media Library /wp-admin/upload.php1,476 ▲764.22 ▲0.03111.38 ▲5.3175.32 ▲31.93
Add New /wp-admin/admin.php?page=ewd-uasp-add-edit-appointment1,1382.0734.7944.41
Dashboard /wp-admin/admin.php?page=ewd-uasp-dashboard1,3102.2130.3858.78
Export /wp-admin/admin.php?page=ewd-uasp-export9172.1832.5634.12
Import /wp-admin/admin.php?page=ewd-uasp-import9172.1831.1834.41
Service Providers /wp-admin/edit.php?post_type=uasp-provider1,2162.2038.1833.78
Ultimate Appointment Scheduling - Welcome! /wp-admin/index.php?page=ewd-uasp-getting-started8,8312.2331.2233.56
Appointments /wp-admin/admin.php?page=ewd-uasp-appointment-submenu1,3062.2231.9535.49
About Us /wp-admin/admin.php?page=ewd-uasp-about-us1,1942.2128.5726.71
Exceptions /wp-admin/edit.php?post_type=uasp-exception1,2162.2137.5735.91
Settings /wp-admin/admin.php?page=ewd-uasp-settings4,7133.5759.8642.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/ultimate-appointment-scheduling/includes/Settings.class.php+979
    preg_replace(): Unknown modifier 'd'
  • Zombie tables detected upon uninstall: 2 tables
    • wp_EWD_UASP_Custom_Fields_Meta
    • wp_EWD_UASP_Appointments
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • ewd-uasp-permission-level
    • can_compress_scripts
    • widget_recent-posts
    • ewd-uasp-installation-time

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ewd-uasp-settings
    • > Warning in wp-content/plugins/ultimate-appointment-scheduling/includes/Settings.class.php+979
    preg_replace(): Unknown modifier 'd'

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ultimate-appointment-scheduling/ewd-uasp-templates/recaptcha.php
  • 154× 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 esc_html() in wp-content/plugins/ultimate-appointment-scheduling/ewd-uasp-templates/login.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ewd_format_classes() in wp-content/plugins/ultimate-appointment-scheduling/ewd-uasp-templates/appointment-booking-form.php:1
    • > PHP Warning
      require_once(EWD_UASP_PLUGIN_DIR/views/View.class.php): failed to open stream: No such file or directory in wp-content/plugins/ultimate-appointment-scheduling/views/Base.class.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultimate-appointment-scheduling/ewd-uasp-templates/admin-selected-date-time.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder' not found in wp-content/plugins/ultimate-appointment-scheduling/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Style\\Supervisor' not found in wp-content/plugins/ultimate-appointment-scheduling/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Alignment.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/ultimate-appointment-scheduling/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/ultimate-appointment-scheduling/lib/simple-admin-pages/classes/AdminPageSetting.Number.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Reader\\BaseReader' not found in wp-content/plugins/ultimate-appointment-scheduling/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Gnumeric.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/ultimate-appointment-scheduling/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/index.php?page=ewd-uasp-getting-started
    • > Network (severe)
    wp-content/plugins/ultimate-appointment-scheduling/assets/css/admin.css?ver=2.2.6 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #10, #11, #7, #8, #9 in ultimate-appointment-scheduling/assets to your readme.txt
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

ultimate-appointment-scheduling/ultimate-appointment-scheduling.php Passed 13 tests

The main file in "Ultimate Appointment Booking & Scheduling" v. 2.2.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
137 characters long description:
Appointment booking calendar and scheduling plugin that lets you set up different services, service providers, locations and availability

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected88,493 lines of code in 494 files:
LanguageFilesBlank linesComment linesLines of code
PHP31115,16531,39164,054
JavaScript1411,0182,38515,846
CSS215512605,927
Markdown1041101,855
PO File1191275436
JSON300245
YAML5191284
Bourne Again Shell16324
XML10022

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,016)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity41.96
▷ Minimum class complexity1.00
▷ Maximum class complexity1,016.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces40
Interfaces10
Traits0
Classes257
▷ Abstract classes145.45%
▷ Concrete classes24394.55%
▷ Final classes00.00%
Methods3,076
▷ Static methods60819.77%
▷ Public methods2,46880.23%
▷ Protected methods752.44%
▷ Private methods53317.33%
Functions35
▷ Named functions3188.57%
▷ Anonymous functions411.43%
Constants777
▷ Global constants121.54%
▷ Class constants76598.46%
▷ Public constants765100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
45 PNG files occupy 1.73MB with 1.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/premium-screenshots/customfields.png45.15KB13.88KB▼ 69.25%
assets/img/ewd-uasp-dashboard-banner.png150.62KB77.17KB▼ 48.76%
assets/img/ewd-support-icon-youtube.png1.75KB0.66KB▼ 62.56%
assets/img/premium-screenshots/styling1.png61.55KB16.41KB▼ 73.34%
assets/img/premium-screenshots/labelling1.png27.65KB7.68KB▼ 72.22%