10% events-handler

Code Review | Events Handler - The Events Plugin

WordPress plugin Events Handler - The Events Plugin scored10%from 54 tests.

About plugin

  • Plugin page: events-handler
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: May 13, 2013
  • Latest release: Jan 18, 2014
  • Number of updates: 76
  • Update frequency: every 3.4 days
  • Top authors: wp-chd-developer (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /5,087 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▼1.83MB] [CPU: ▼51.51ms] Passed 4 tests

Server-side resources used by Events Handler - The Events Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.305.87 ▼37.06
Dashboard /wp-admin2.18 ▼1.126.51 ▼45.53
Posts /wp-admin/edit.php2.18 ▼1.179.74 ▼44.47
Add New Post /wp-admin/post-new.php2.18 ▼3.705.92 ▼78.99
Media Library /wp-admin/upload.php2.18 ▼1.057.08 ▼32.13
Tickets /wp-admin/admin.php?page=tickets2.186.83
/wp-admin/admin.php?page=booking2.187.38
Events Handler /wp-admin/admin.php?page=eventshandler2.185.45
Short Codes /wp-admin/admin.php?page=shortcode2.186.86
/wp-admin/admin.php?page=add_ticket2.185.91
Calendar /wp-admin/admin.php?page=calendar2.187.15
/wp-admin/admin.php?page=editticket2.185.79
Customers /wp-admin/admin.php?page=customers2.188.30
/wp-admin/admin.php?page=bookingdetails2.186.58
/wp-admin/admin.php?page=edit_event2.186.32

Server storage [IO: ▲2.07MB] [DB: ▲0.03MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 479 new files
Database: 8 new tables, 6 new options
New tables
wp_eh_templates
wp_eh_settings
wp_eh_add_customers
wp_eh_currency
wp_eh_add_event
wp_eh_countries
wp_eh_add_tickets
wp_eh_add_booking
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Events Handler - The Events Plugin: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,218 ▲45715.39 ▲1.0113.29 ▲11.3842.39 ▼2.33
Dashboard /wp-admin2,349 ▲1495.73 ▼0.14107.02 ▼8.7493.09 ▲48.78
Posts /wp-admin/edit.php2,249 ▲1492.40 ▲0.4044.31 ▲5.9055.12 ▲20.78
Add New Post /wp-admin/post-new.php1,813 ▲26823.23 ▲0.02667.07 ▼23.3437.44 ▼18.19
Media Library /wp-admin/upload.php1,534 ▲1344.91 ▲0.75103.91 ▼17.4186.70 ▲37.37
Tickets /wp-admin/admin.php?page=tickets1,3062.6353.5990.49
/wp-admin/admin.php?page=booking1,3542.3538.3967.35
Events Handler /wp-admin/admin.php?page=eventshandler1,3292.6346.4368.81
Short Codes /wp-admin/admin.php?page=shortcode1,2462.3539.8460.21
/wp-admin/admin.php?page=add_ticket2,0567.49149.29122.40
Calendar /wp-admin/admin.php?page=calendar1,6582.9562.0162.28
/wp-admin/admin.php?page=editticket2,0417.35165.56124.16
Customers /wp-admin/admin.php?page=customers1,2932.6247.0972.57
/wp-admin/admin.php?page=bookingdetails1,3072.6544.5374.33
/wp-admin/admin.php?page=edit_event3,7967.74143.73157.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 112 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 112 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
    • > GET request to /wp-admin/admin.php?page=editticket
    • > Notice in wp-content/plugins/events-handler/views/editticket.php+2
    Undefined index: tid
    • > GET request to /wp-admin/admin.php?page=editticket
    • > Notice in wp-content/plugins/events-handler/views/editticket.php+101
    Trying to get property 'TicketName' of non-object
    • > GET request to /wp-admin/admin.php?page=editticket
    • > Notice in wp-content/plugins/events-handler/views/editticket.php+110
    Trying to get property 'TicketDesc' of non-object
    • > GET request to /wp-admin/admin.php?page=editticket
    • > Notice in wp-content/plugins/events-handler/views/editticket.php+130
    Trying to get property 'TicketPrice' of non-object
    • > GET request to /wp-admin/admin.php?page=editticket
    • > Notice in wp-content/plugins/events-handler/views/editticket.php+138
    Trying to get property 'TicketAvail' of non-object
    • > GET request to /wp-admin/admin.php?page=editticket
    • > Notice in wp-content/plugins/events-handler/views/editticket.php+146
    Trying to get property 'TicketMinReq' of non-object
    • > GET request to /wp-admin/admin.php?page=editticket
    • > Notice in wp-content/plugins/events-handler/views/editticket.php+154
    Trying to get property 'TicketMaxReq' of non-object
    • > GET request to /wp-admin/admin.php?page=bookingdetails
    • > Notice in wp-content/plugins/events-handler/views/bookings_detail.php+56
    Undefined index: bid
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+3
    Undefined index: eid
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+111
    Trying to get property 'EventFrom' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+119
    Trying to get property 'EventTo' of non-object
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+63
    Trying to get property 'EventColorCode' of non-object
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+71
    Trying to get property 'EventName' of non-object
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+79
    Trying to get property 'EventDescription' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+621
    Trying to get property 'EventFullDay' of non-object
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+128
    Trying to get property 'EventSTotalTime' of non-object
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+134
    Trying to get property 'EventETotalTime' of non-object
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+338
    Trying to get property 'EventLocName' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+432
    Trying to get property 'EventLocAddress' of non-object
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+354
    Trying to get property 'EventLocCity' of non-object
  • 275 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Notice in wp-content/plugins/events-handler/views/editEvent.php+433
    Trying to get property 'EventLocCountry' of non-object
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/events-handler/lib/event-class.php+160
    Trying to get property 'CountryName' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 39× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/events-handler/views/events_show.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/events-handler/views/front_end_fullcalendar.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/events-handler/install-script.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function addEventTable() in wp-content/plugins/events-handler/uninstall-script.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/events-handler/views/api_key.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/events-handler/views/editticket.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/events-handler/header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/events-handler/views/add_event.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/events-handler/menus.php:7
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/events-handler/views/editEvent.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=calendar
    • > Javascript (severe) in unknown
    /wp-content/plugins/events-handler/js/jquery.fullcalendar.min.js?ver=6.3.1 4851:27 Uncaught TypeError: Cannot read properties of undefined (reading 'offsetTop')
    • > GET request to /wp-admin/admin.php?page=edit_event
    • > Network (severe)
    wp-content/plugins/events-handler/css/images/ui-bg_flat_75_ffffff_40x100.png - 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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Add Events), #2 (Edit Events), #3 (Add Tickets), #4 (Calendar Events), #5 (General Settomgs), #6 (View Bookings), #7 (View Customers)
  • Tags: Please reduce the number of tags, currently 27 tag instead of maximum 10
You can look at the official readme.txt

events-handler/events-handler.php Passed 13 tests

"Events Handler - The Events Plugin" version 1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
99 characters long description:
Events Handler is a highly configurable product which allows you to have multiple organized events.

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
Good job! No executable or dangerous file extensions detected30,802 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
PHP344326512,733
JavaScript101,1025888,563
PO File123,0614,0466,409
CSS114601783,075
XML10022

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions47
▷ Named functions47100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
345 compressed PNG files occupy 0.49MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/color/current-work.png0.93KB1.06KB0.00%
gfx/icons/big/idea.png1.09KB0.95KB▼ 12.40%
gfx/icons/small/ICONS WITH TEXT/file.png0.38KB0.39KB0.00%
gfx/icons/small/ICONS WITH TEXT/check.png0.71KB0.53KB▼ 25.00%
images/icons/color/upcoming-work.png1.35KB1.40KB0.00%