77% awesome-event-booking

Code Review | Awesome Event Booking

WordPress plugin Awesome Event Booking scored77%from 54 tests.

About plugin

  • Plugin page: awesome-event-boo...
  • Plugin version: 2.6.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 10, 2018
  • Latest release: Oct 5, 2023
  • Number of updates: 43
  • Update frequency: every 43.8 days
  • Top authors: togidata (86.05%)duramono (16.28%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /5,455 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼10.81ms] Passed 4 tests

A check of server-side resources used by Awesome Event Booking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2142.46 ▲4.01
Dashboard /wp-admin3.58 ▲0.2454.12 ▼5.03
Posts /wp-admin/edit.php3.39 ▲0.0331.09 ▼15.33
Add New Post /wp-admin/post-new.php6.19 ▲0.3085.83 ▼26.88
Media Library /wp-admin/upload.php3.51 ▲0.2838.48 ▲4.47
All Events /wp-admin/edit.php?post_type=cpt_events3.5840.31
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=cpt_events3.5839.61
Attendees /wp-admin/admin.php?page=attendees3.4532.11
Regions /wp-admin/edit.php?post_type=location_region3.5648.23
Locations /wp-admin/edit.php?post_type=event_location3.5657.25
Event Bookings /wp-admin/edit.php?post_type=event_booking3.5441.40
Event Managers /wp-admin/edit.php?post_type=event_manager3.5640.73
Add New Event /wp-admin/post-new.php?post_type=cpt_events3.7091.06
Documentation /wp-admin/edit.php?post_type=cpt_events&page=wp_event_booking_doc3.5651.77
Settings /wp-admin/edit.php?post_type=cpt_events&page=wp_event_booking_settings3.6733.86

Server storage [IO: ▲95.71MB] [DB: ▲0.08MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • The filesystem usage should be lower than 25MB (currently using 95.71MB)
Filesystem: 769 new files
Database: no new tables, 60 new options
New WordPress options
signUpAdminNotificationSubject
show_attendant_e_mail_address
AdminAddCustomerAdminNotification
cancelCustomerNotification
AdminAddCustomerCustomerNotification
AvailableSeats
cancelAdminNotification
show_attendant_last_name
usercancelCustomerNotificationSubject
wpeb_checkout_page
...

Browser metrics Passed 4 tests

Awesome Event Booking: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,079 ▲33314.43 ▲0.076.75 ▲4.9943.27 ▼1.95
Dashboard /wp-admin2,332 ▲1435.63 ▼0.30143.55 ▲34.5747.12 ▲4.07
Posts /wp-admin/edit.php2,226 ▲1372.44 ▲0.3849.18 ▲12.6142.25 ▲8.16
Add New Post /wp-admin/post-new.php1,628 ▲10023.77 ▲5.63750.25 ▲109.6541.36 ▼12.38
Media Library /wp-admin/upload.php1,548 ▲1604.90 ▲0.6999.33 ▲0.2141.17 ▼3.48
All Events /wp-admin/edit.php?post_type=cpt_events2,1292.9254.2732.37
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=cpt_events1,5822.2040.7534.83
Attendees /wp-admin/admin.php?page=attendees9002.3531.9924.65
Regions /wp-admin/edit.php?post_type=location_region1,1932.3653.3335.51
Locations /wp-admin/edit.php?post_type=event_location1,1902.4153.9044.65
Event Bookings /wp-admin/edit.php?post_type=event_booking1,2152.4252.4933.76
Event Managers /wp-admin/edit.php?post_type=event_manager1,1872.4148.2834.59
Add New Event /wp-admin/post-new.php?post_type=cpt_events5,13910.49303.62102.06
Documentation /wp-admin/edit.php?post_type=cpt_events&page=wp_event_booking_doc1,2762.2952.8248.52
Settings /wp-admin/edit.php?post_type=cpt_events&page=wp_event_booking_settings1,5612.4232.4742.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 60 options in the database
    • wpeb_my_accounts_page
    • sendReminderBeforeMessage
    • usercancelCustomerNotificationSubject
    • AvailableSeats
    • usercancelAdminNotification
    • widget_theysaidso_widget
    • show_event_manager_phone
    • timeRangeSeparator
    • wpeb_events_page
    • widget_recent-comments
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=attendees
    • > Notice in wp-content/plugins/awesome-event-booking/admin/functions.php+1426
    Undefined variable: permalink
    • > GET request to /wp-admin/edit.php?post_type=event_booking
    • > Notice in wp-content/plugins/awesome-event-booking/admin/functions.php+1646
    Undefined index: booking_status
    • > GET request to /wp-admin/edit.php?post_type=event_booking
    • > Notice in wp-content/plugins/awesome-event-booking/admin/functions.php+1688
    Undefined index: all_posts
    • > GET request to /wp-admin/edit.php?post_type=event_booking
    • > Notice in wp-content/plugins/awesome-event-booking/admin/functions.php+1691
    Undefined index: post_status
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cpt_events&page=wp_event_booking_settings
    • > Notice in wp-content/plugins/awesome-event-booking/captcha/admin/admin_functions.php+41
    Trying to access array offset on value of type bool
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cpt_events&page=wp_event_booking_settings
    • > Notice in wp-content/plugins/awesome-event-booking/captcha/admin/admin_functions.php+41
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/edit.php?post_type=cpt_events&page=wp_event_booking_settings
    • > Notice in wp-content/plugins/awesome-event-booking/captcha/admin/admin_functions.php+16
    Undefined index: tab

SRP 50% 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
Almost there! Just fix the following items
  • 258× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/awesome-event-booking/library/mpdf/mpdf/src/Tag/Acronym.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/awesome-event-booking/library/mpdf/mpdf/src/Tag/Time.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Barcode\\AbstractBarcode' not found in wp-content/plugins/awesome-event-booking/library/mpdf/mpdf/src/Barcode/Rm4Scc.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/awesome-event-booking/library/mpdf/mpdf/src/Tag/Br.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Barcode\\AbstractBarcode' not found in wp-content/plugins/awesome-event-booking/library/mpdf/mpdf/src/Barcode/EanExt.php:10
    • > PHP Fatal error
      Trait 'Mpdf\\Strict' not found in wp-content/plugins/awesome-event-booking/library/mpdf/mpdf/src/Otl.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/awesome-event-booking/library/mpdf/mpdf/src/Tag/U.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/awesome-event-booking/library/mpdf/mpdf/src/Tag/Strike.php:5
    • > PHP Warning
      Use of undefined constant WPEB_DIR - assumed 'WPEB_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/awesome-event-booking/admin/init.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/awesome-event-booking/public/not-in-use--shortcodes.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

awesome-event-booking/wp_event_booking.php 85% from 13 tests

"Awesome Event Booking" version 2.6.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("awesome-event-booking.php" instead of "wp_event_booking.php")

Code Analysis 95% from 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
Everything looks great! No dangerous files found in this plugin103,915 lines of code in 484 files:
LanguageFilesBlank linesComment linesLines of code
PHP43011,78112,17582,253
JavaScript141,7968748,810
CSS135701916,396
SVG1002,671
PO File36358071,501
Markdown739501,217
JSON830503
HTML18415414
XML310075
YAML320272
Bourne Shell1203

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 7,027)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 460)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity58.73
▷ Minimum class complexity1.00
▷ Maximum class complexity7,027.00
Average method complexity14.00
▷ Minimum method complexity1.00
▷ Maximum method complexity460.00
Code structure
Namespaces50
Interfaces10
Traits6
Classes288
▷ Abstract classes93.12%
▷ Concrete classes27996.88%
▷ Final classes113.94%
Methods1,358
▷ Static methods1239.06%
▷ Public methods1,17386.38%
▷ Protected methods554.05%
▷ Private methods1309.57%
Functions208
▷ Named functions18588.94%
▷ Anonymous functions2311.06%
Constants436
▷ Global constants132.98%
▷ Class constants42397.02%
▷ Public constants423100.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
18 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/css/images/ui-bg_glass_100_fdf5ce_1x400.png0.34KB0.16KB▼ 54.02%
src/css/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
src/css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
library/myclabs/deep-copy/doc/clone.png12.09KB5.48KB▼ 54.70%
src/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png5.68KB1.83KB▼ 67.77%