67% eventprime-event-calendar-management

Code Review | EventPrime – Events Calendar, Bookings and Tickets

WordPress plugin EventPrime – Events Calendar, Bookings and Tickets scored67%from 54 tests.

About plugin

  • Plugin page: eventprime-event-...
  • Plugin version: 3.3.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.4
  • WordPress version: 6.3.1
  • First release: Feb 28, 2019
  • Latest release: Nov 25, 2023
  • Number of updates: 343
  • Update frequency: every 5.1 days
  • Top authors: metagauss (93.29%)eventprime (4.66%)profilegrid0 (2.62%)

Code review

54 tests

User reviews

28 reviews

Install metrics

2,000+ active /153,184 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲4.39MB] [CPU: ▲37.72ms] Passed 4 tests

Server-side resources used by EventPrime – Events Calendar, Bookings and Tickets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /6.86 ▲3.4062.48 ▲21.87
Dashboard /wp-admin8.04 ▲4.6993.54 ▲34.98
Posts /wp-admin/edit.php8.11 ▲4.7594.02 ▲48.06
Add New Post /wp-admin/post-new.php10.77 ▲4.88146.15 ▲55.30
Media Library /wp-admin/upload.php7.96 ▲4.7379.90 ▲45.98
Email /wp-admin/edit.php?post_type=em_event&page=ep-bulk-emails8.0082.81
Bookings /wp-admin/edit.php?post_type=em_booking8.0487.65
Shortcodes /wp-admin/edit.php?post_type=em_event&page=ep-publish-shortcodes8.2479.51
Extensions /wp-admin/edit.php?post_type=em_event&page=ep-extensions7.9779.05
Types /wp-admin/edit-tags.php?taxonomy=em_event_type&post_type=em_event8.0782.11
Calendar /wp-admin/edit.php?post_type=em_event&page=ep-event-calendar8.4482.26
Organizers /wp-admin/edit-tags.php?taxonomy=em_event_organizer&post_type=em_event8.0878.88
All Events /wp-admin/edit.php?post_type=em_event8.0783.72
Reports /wp-admin/edit.php?post_type=em_event&page=ep-events-reports8.3085.49
Settings /wp-admin/edit.php?post_type=em_event&page=ep-settings8.6181.47

Server storage [IO: ▲17.31MB] [DB: ▲0.08MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 501 new files
Database: 3 new tables, 19 new options
New tables
wp_em_price_options
wp_eventprime_ticket_categories
wp_eventprime_checkout_fields
New WordPress options
widget_eventm_calendar
db_upgraded
widget_eventm_event_countdown
widget_eventm_popular_organizer
widget_eventm_featured_venue
widget_eventm_popular_performer
widget_eventm_featured_type
widget_recent-comments
emagic_db_version
widget_eventm_popular_type
...

Browser metrics Passed 4 tests

A check of browser resources used by EventPrime – Events Calendar, Bookings and Tickets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,391 ▲62923.14 ▲8.406.90 ▲5.2839.34 ▼4.85
Dashboard /wp-admin2,632 ▲45512.57 ▲6.91292.21 ▲188.8744.57 ▲3.10
Posts /wp-admin/edit.php2,562 ▲46212.67 ▲10.64120.61 ▲83.4239.37 ▼0.34
Add New Post /wp-admin/post-new.php1,641 ▲9623.66 ▲5.42484.40 ▼125.4034.95 ▼36.75
Media Library /wp-admin/upload.php1,694 ▲30011.65 ▲7.47137.76 ▲41.2845.10 ▲3.37
Email /wp-admin/edit.php?post_type=em_event&page=ep-bulk-emails1,55211.59213.5269.25
Bookings /wp-admin/edit.php?post_type=em_booking1,76312.69118.1138.45
Shortcodes /wp-admin/edit.php?post_type=em_event&page=ep-publish-shortcodes2,48712.4197.8229.88
Extensions /wp-admin/edit.php?post_type=em_event&page=ep-extensions2,42412.2298.43104.04
Types /wp-admin/edit-tags.php?taxonomy=em_event_type&post_type=em_event2,02812.94112.5169.07
Calendar /wp-admin/edit.php?post_type=em_event&page=ep-event-calendar1,92010.10194.7850.64
Organizers /wp-admin/edit-tags.php?taxonomy=em_event_organizer&post_type=em_event1,96912.44120.0143.65
All Events /wp-admin/edit.php?post_type=em_event1,65312.68123.0632.49
Reports /wp-admin/edit.php?post_type=em_event&page=ep-events-reports1,78515.08141.3882.09
Settings /wp-admin/edit.php?post_type=em_event&page=ep-settings1,73312.74115.0367.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_em_price_options
    • wp_eventprime_checkout_fields
    • wp_eventprime_ticket_categories
  • This plugin did not uninstall successfully, leaving 19 options in the database
    • emagic_db_version
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_eventm_event_countdown
    • widget_eventm_featured_venue
    • widget_eventm_popular_organizer
    • widget_eventm_popular_type
    • widget_eventm_slider
    • widget_eventm_popular_venue
    • widget_recent-posts
    • ...

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 no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 28× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/eventprime-event-calendar-management/includes/core/admin/settings/emailers/mail/refund.php
    • > /wp-content/plugins/eventprime-event-calendar-management/includes/events/views/list/views/calendar.php
    • > /wp-content/plugins/eventprime-event-calendar-management/includes/venues/views/list/views/box.php
    • > /wp-content/plugins/eventprime-event-calendar-management/includes/core/admin/settings/emailers/mail/event_submitted.php
    • > /wp-content/plugins/eventprime-event-calendar-management/includes/event_types/views/list/views/card.php
    • > /wp-content/plugins/eventprime-event-calendar-management/includes/core/admin/settings/emailers/mail/welcome_mail.php
    • > /wp-content/plugins/eventprime-event-calendar-management/includes/core/admin/settings/emailers/mail/reset_user_password.php
    • > /wp-content/plugins/eventprime-event-calendar-management/includes/core/admin/settings/emailers/mail/payment_confirmed.php
    • > /wp-content/plugins/eventprime-event-calendar-management/includes/core/admin/settings/emailers/mail/cancellation.php
    • > /wp-content/plugins/eventprime-event-calendar-management/includes/events/views/list/views/slider.php
  • 271× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'organizer_details' of non-object in wp-content/plugins/eventprime-event-calendar-management/includes/events/views/single-event/organizers.php on line 2
    • > PHP Notice
      Trying to get property 'terms' of non-object in wp-content/plugins/eventprime-event-calendar-management/includes/organizers/views/list/views/box.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/eventprime-event-calendar-management/includes/core/admin/settings/emailers/emailer-booking_canceled.php:6
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/eventprime-event-calendar-management/includes/events/views/list/views/masonry.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'EventM_Factory_Service' not found in wp-content/plugins/eventprime-event-calendar-management/includes/core/admin/settings/settings-tab-license.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/eventprime-event-calendar-management/includes/events/views/view-list-load.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/eventprime-event-calendar-management/includes/bookings/admin/meta-boxes/views/meta-box-booking-notes.php:2
    • > PHP Notice
      Trying to get property 'performers' of non-object in wp-content/plugins/eventprime-event-calendar-management/includes/performers/views/list/views/list.php on line 10
    • > PHP Notice
      Trying to get property 'performer_details' of non-object in wp-content/plugins/eventprime-event-calendar-management/includes/events/views/single-event/performers.php on line 2
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/eventprime-event-calendar-management/includes/venues/views/single-venue/load_more.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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: You are using too many tags: 17 tag instead of maximum 10
You can look at the official readme.txt

eventprime-event-calendar-management/event-prime.php 92% from 13 tests

The entry point to "EventPrime – Events Calendar, Bookings and Tickets" version 3.3.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("eventprime-event-calendar-management.php" instead of "event-prime.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin139,814 lines of code in 404 files:
LanguageFilesBlank linesComment linesLines of code
PHP3085,11517,34096,460
JSON90016,618
JavaScript469691,32412,814
CSS372,82546410,473
PO File11,4842,9213,349
Markdown121063
SVG20037

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 4,413)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity135.22
▷ Minimum class complexity1.00
▷ Maximum class complexity4,413.00
Average method complexity9.11
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes94
▷ Abstract classes00.00%
▷ Concrete classes94100.00%
▷ Final classes11.06%
Methods1,561
▷ Static methods34822.29%
▷ Public methods1,23178.86%
▷ Protected methods27817.81%
▷ Private methods523.33%
Functions121
▷ Named functions11191.74%
▷ Anonymous functions108.26%
Constants159
▷ Global constants159100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
48 PNG files occupy 0.91MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/css/images/ui-icons_ffffff_256x240.png6.33KB4.18KB▼ 33.99%
includes/assets/images/event_sponsors_icon.png9.55KB3.46KB▼ 63.73%
includes/assets/images/advanced-chckout-fields.png28.29KB12.33KB▼ 56.42%
includes/assets/images/event_tickets_icon.png11.00KB5.07KB▼ 53.88%
includes/assets/css/images/ui-icons_777620_256x240.png4.51KB4.18KB▼ 7.28%