52% ameliabooking

Code Review | Booking for Appointments and Events Calendar - Amelia

WordPress plugin Booking for Appointments and Events Calendar - Amelia scored52%from 54 tests.

About plugin

  • Plugin page: ameliabooking
  • Plugin version: 1.0.92
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Dec 11, 2018
  • Latest release: Nov 27, 2023
  • Number of updates: 160
  • Update frequency: every 11.4 days
  • Top authors: ameliabooking (100%)

Code review

54 tests

User reviews

496 reviews

Install metrics

60,000+ active /499,624 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.26MB] [CPU: ▲1.66ms] Passed 4 tests

A check of server-side resources used by Booking for Appointments and Events Calendar - Amelia
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2241.93 ▲0.01
Dashboard /wp-admin3.61 ▲0.2653.93 ▼10.45
Posts /wp-admin/edit.php3.67 ▲0.3154.04 ▲4.53
Add New Post /wp-admin/post-new.php7.48 ▲1.59197.71 ▲98.34
Media Library /wp-admin/upload.php3.47 ▲0.2443.83 ▲12.55
Dashboard /wp-admin/admin.php?page=wpamelia-dashboard3.71319.83
Customize New /wp-admin/admin.php?page=wpamelia-customize-new3.59478.69
Lite vs Premium /wp-admin/admin.php?page=wpamelia-lite-vs-premium3.50481.03
Events /wp-admin/admin.php?page=wpamelia-events3.56283.94
Custom Fields /wp-admin/admin.php?page=wpamelia-cf3.52474.22
Locations /wp-admin/admin.php?page=wpamelia-locations3.50477.72
Finance /wp-admin/admin.php?page=wpamelia-finance3.51280.96
Customize /wp-admin/admin.php?page=wpamelia-customize3.52279.17
Settings /wp-admin/admin.php?page=wpamelia-settings3.57287.78
What's new /wp-admin/admin.php?page=wpamelia-whats-new3.53308.84

Server storage [IO: ▲191.80MB] [DB: ▲0.10MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • The filesystem usage should be lower than 25MB (currently using 191.80MB)
Filesystem: 6,434 new files
Database: 55 new tables, 7 new options
New tables
wp_amelia_providers_to_periods
wp_amelia_coupons
wp_amelia_custom_fields
wp_amelia_providers_to_services
wp_amelia_events_to_tickets
wp_amelia_services
wp_amelia_events_tags
wp_amelia_notifications_log
wp_amelia_categories
wp_amelia_providers_to_locations
...
New WordPress options
widget_theysaidso_widget
amelia_settings
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Booking for Appointments and Events Calendar - Amelia
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲14714.17 ▼0.041.60 ▼0.3528.59 ▼15.31
Dashboard /wp-admin2,299 ▲1195.69 ▲0.0499.32 ▲4.5889.25 ▲52.35
Posts /wp-admin/edit.php2,216 ▲1161.99 ▼0.0237.07 ▼2.5136.33 ▼1.83
Add New Post /wp-admin/post-new.php6,487 ▲4,96128.25 ▲4.80999.82 ▲391.1742.63 ▼6.98
Media Library /wp-admin/upload.php1,507 ▲1104.20 ▼0.01105.48 ▲9.8177.73 ▲34.07
Dashboard /wp-admin/admin.php?page=wpamelia-dashboard2,04210.37283.86127.18
Customize New /wp-admin/admin.php?page=wpamelia-customize-new1,7297.8791.8479.80
Lite vs Premium /wp-admin/admin.php?page=wpamelia-lite-vs-premium2,29510.60202.9966.74
Events /wp-admin/admin.php?page=wpamelia-events1,74011.7089.0862.57
Custom Fields /wp-admin/admin.php?page=wpamelia-cf1,6829.3084.4646.95
Locations /wp-admin/admin.php?page=wpamelia-locations1,9199.2890.2066.95
Finance /wp-admin/admin.php?page=wpamelia-finance2,01510.5195.3557.88
Customize /wp-admin/admin.php?page=wpamelia-customize1,68110.15100.3762.32
Settings /wp-admin/admin.php?page=wpamelia-settings2,0679.2899.3043.37
What's new /wp-admin/admin.php?page=wpamelia-whats-new2,7897.47112.3574.76

Uninstaller [IO: ▲1.77MB] [DB: ▲0.10MB] 50% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 55 tables in the database
    • wp_amelia_coupons_to_events
    • wp_amelia_providers_to_google_calendar
    • wp_amelia_notifications_log
    • wp_amelia_custom_fields_options
    • wp_amelia_locations
    • wp_amelia_coupons
    • wp_amelia_providers_to_specialdays_periods
    • wp_amelia_notifications
    • wp_amelia_providers_to_services
    • wp_amelia_providers_views
    • ...
  • The uninstall procedure has failed, leaving 7 options in the database
    • amelia_settings
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% 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 no errors were found, this is by no means 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 fix the following items
  • 30× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/ameliabooking/src/Infrastructure/ContainerConfig/application.services.php
    • > /wp-content/plugins/ameliabooking/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_samesite.php
    • > /wp-content/plugins/ameliabooking/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/regenerate.php
    • > /wp-content/plugins/ameliabooking/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/read_only.php
    • > /wp-content/plugins/ameliabooking/view/backend/view.php
    • > /wp-content/plugins/ameliabooking/src/Infrastructure/ContainerConfig/domain.services.php
    • > /wp-content/plugins/ameliabooking/vendor/stripe/stripe-php/build.php
    • > /wp-content/plugins/ameliabooking/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_raw_urlencode.php
    • > /wp-content/plugins/ameliabooking/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_cookie_and_session.php
    • > /wp-content/plugins/ameliabooking/vendor/phpmailer/phpmailer/get_oauth_token.php
  • 2610× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Microsoft\\Graph\\Core\\Enum' not found in wp-content/plugins/ameliabooking/vendor/microsoft/microsoft-graph/src/Model/MeetingMessageType.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Microsoft\\Graph\\Model\\Entity' not found in wp-content/plugins/ameliabooking/vendor/microsoft/microsoft-graph/src/Model/ConversationThread.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'AmeliaBooking\\Infrastructure\\Repository\\AbstractRepository' not found in wp-content/plugins/ameliabooking/src/Infrastructure/Repository/Notification/NotificationsToEntitiesRepository.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Microsoft\\Graph\\Model\\Entity' not found in wp-content/plugins/ameliabooking/vendor/microsoft/microsoft-graph/src/Model/MediaConfig.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Omnipay\\Common\\Item' not found in wp-content/plugins/ameliabooking/vendor/omnipay/paypal/src/PayPalItem.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'AmeliaHttp\\Client\\Common\\Plugin' not found in wp-content/plugins/ameliabooking/vendor/php-http/client-common/src/Plugin/HeaderDefaultsPlugin.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Microsoft\\Graph\\Model\\DeviceConfiguration' not found in wp-content/plugins/ameliabooking/vendor/microsoft/microsoft-graph/src/Model/IosUpdateConfiguration.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Razorpay\\Tests\\TestCase' not found in wp-content/plugins/ameliabooking/vendor/razorpay/razorpay/tests/virtualAccountTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AmeliaBooking\\Application\\Commands\\Command' not found in wp-content/plugins/ameliabooking/src/Application/Commands/User/GetUserDeleteEffectCommand.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Microsoft\\Graph\\Model\\EducationOrganization' not found in wp-content/plugins/ameliabooking/vendor/microsoft/microsoft-graph/src/Model/EducationSchool.php:27

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=wpamelia-dashboard
    • > Console-api (warning) in wp-content/plugins/ameliabooking/public/js/chunks/amelia-booking-dashboard-0badb7ba9f5a7e615430.js+0:386584
    bar chart: \"scales.[x/y]Axes.barThickness\" is deprecated. Please use \"dataset.barThickness\" instead
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpamelia-dashboard
    • > Console-api (warning) in wp-content/plugins/ameliabooking/public/js/chunks/amelia-booking-dashboard-0badb7ba9f5a7e615430.js+0:386584
    bar chart: \"scales.[x/y]Axes.barPercentage\" is deprecated. Please use \"dataset.barPercentage\" instead
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpamelia-dashboard
    • > Console-api (warning) in wp-content/plugins/ameliabooking/public/js/chunks/amelia-booking-dashboard-0badb7ba9f5a7e615430.js+0:386584
    bar chart: \"scales.[x/y]Axes.categoryPercentage\" is deprecated. Please use \"dataset.categoryPercentage\" instead
    • > GET request to /wp-admin/admin.php?page=wpamelia-cf
    • > Console-api (warning) in wp-content/plugins/ameliabooking/public/js/chunks/amelia-booking-cf-0badb7ba9f5a7e615430.js+0:115389
    Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

ameliabooking/ameliabooking.php 92% from 13 tests

"Booking for Appointments and Events Calendar - Amelia" version 1.0.92's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Please fix the following items
  • Do not distribute dangerous files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/ameliabooking/vendor/stripe/stripe-php/data/ca-certificates.crt
    • .xlsm - Excel Macro-Enabled Workbook in Microsoft Excel
      • wp-content/plugins/ameliabooking/vendor/symfony/http-foundation/Tests/File/Fixtures/case-sensitive-mime-type.xlsm
620,120 lines of code in 4,914 files:
LanguageFilesBlank linesComment linesLines of code
PHP3,46152,438174,504264,065
Vuejs Component41315,8256,149113,280
PO File3365,649114,79390,314
JavaScript4198,51671248,416
LESS476,44577232,361
JSON611031,195
Markdown1075,613018,252
Sass14267317,559
CSS531017915,847
SVG2532624,178
XML1765502,727
C118847879
YAML239019538
C/C++ Header24046132
reStructuredText19413597
Bourne Shell1203492
Pascal2417479
m41111141
make214038
HTML10014
Dockerfile18010
INI1016

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 192)
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.37
▷ Minimum class complexity1.00
▷ Maximum class complexity515.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity192.00
Code structure
Namespaces441
Interfaces157
Traits33
Classes3,170
▷ Abstract classes702.21%
▷ Concrete classes3,10097.79%
▷ Final classes34711.19%
Methods20,572
▷ Static methods1,5877.71%
▷ Public methods18,93992.06%
▷ Protected methods9154.45%
▷ Private methods7183.49%
Functions717
▷ Named functions14820.64%
▷ Anonymous functions56979.36%
Constants3,266
▷ Global constants912.79%
▷ Class constants3,17597.21%
▷ Public constants3,175100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
990 compressed PNG files occupy 4.44MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/nu.png0.78KB1.00KB0.00%
v3/src/assets/img/flags/uy.png0.75KB0.82KB0.00%
public/images/ws.png0.75KB0.94KB0.00%
public/images/pk.png0.80KB1.12KB0.00%
public/images/mm.png0.62KB0.83KB0.00%