68% event-organiser

Code Review | Event Organiser

WordPress plugin Event Organiser scored68%from 54 tests.

About plugin

  • Plugin page: event-organiser
  • Plugin version: 3.12.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 19, 2011
  • Latest release: Oct 2, 2023
  • Number of updates: 407
  • Update frequency: every 10.6 days
  • Top authors: stephenh1988 (40.05%)stephenharris (33.42%)jenkinspress (27.03%)

Code review

54 tests

User reviews

137 reviews

Install metrics

30,000+ active /1,515,469 total downloads

Benchmarks

Plugin footprint 65% 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: ▲2.29MB] [CPU: ▲7.39ms] Passed 4 tests

Server-side resources used by Event Organiser
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.38 ▲1.9254.83 ▲14.99
Dashboard /wp-admin5.72 ▲2.4264.76 ▲17.62
Posts /wp-admin/edit.php5.78 ▲2.4359.65 ▲8.57
Add New Post /wp-admin/post-new.php8.35 ▲2.4794.03 ▼11.61
Media Library /wp-admin/upload.php5.63 ▲2.4154.20 ▲21.08
Categories /wp-admin/edit-tags.php?taxonomy=event-category&post_type=event5.6349.83
Extensions /wp-admin/edit.php?post_type=event&page=eo-addons5.63454.09
System Info /wp-admin/edit.php?post_type=event&page=debug5.6149.91
Add New /wp-admin/post-new.php?post_type=event5.7968.50
Calendar View /wp-admin/edit.php?post_type=event&page=calendar5.6249.41
Venues /wp-admin/edit.php?post_type=event&page=venues5.6545.91
Event Organiser /wp-admin/options-general.php?page=event-settings5.6346.04
All Events /wp-admin/edit.php?post_type=event5.7152.69

Server storage [IO: ▲5.90MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 211 new files
Database: 2 new tables, 14 new options
New tables
wp_eo_events
wp_eo_venuemeta
New WordPress options
widget_theysaidso_widget
widget_eo_events_agenda_widget
widget_eo-event-venues
widget_eo-event-categories
eventorganiser_admin_notices
widget_eo_calendar_widget
db_upgraded
widget_recent-comments
eventorganiser_version
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Event Organiser: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲15513.20 ▼1.092.10 ▲0.4138.70 ▼0.91
Dashboard /wp-admin2,266 ▲785.84 ▲0.9799.29 ▼23.7937.09 ▼2.55
Posts /wp-admin/edit.php2,155 ▲692.03 ▲0.0633.55 ▼6.8033.48 ▼3.88
Add New Post /wp-admin/post-new.php1,566 ▲4723.34 ▼0.05686.74 ▲74.9361.89 ▼7.88
Media Library /wp-admin/upload.php1,451 ▲664.30 ▲0.1094.13 ▼5.5844.20 ▲1.20
Categories /wp-admin/edit-tags.php?taxonomy=event-category&post_type=event1,3702.3330.6927.26
Extensions /wp-admin/edit.php?post_type=event&page=eo-addons1,1122.2027.5141.44
System Info /wp-admin/edit.php?post_type=event&page=debug1,1382.0723.4934.88
Add New /wp-admin/post-new.php?post_type=event4,0439.24244.4688.40
Calendar View /wp-admin/edit.php?post_type=event&page=calendar1,9084.61112.9550.34
Venues /wp-admin/edit.php?post_type=event&page=venues1,2711.8427.9633.48
Event Organiser /wp-admin/options-general.php?page=event-settings1,1711.7424.7131.23
All Events /wp-admin/edit.php?post_type=event1,2921.9633.8432.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > 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 10 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_eo-event-categories
    • widget_eo-event-venues
    • theysaidso_admin_options
    • widget_eo_event_list_widget
    • widget_recent-posts
    • widget_eo_events_agenda_widget
    • widget_theysaidso_widget
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/event-organiser/includes/class-event-organiser-im-export.php
  • 55× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant EVENT_ORGANISER_DIR - assumed 'EVENT_ORGANISER_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/event-organiser/event-organiser-debug.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/event-organiser/includes/event-organiser-archives.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/event-organiser/includes/class-eo-theme-compatability.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/event-organiser/templates/eo-loop-events.php:20
    • > PHP Warning
      require_once(EVENT_ORGANISER_DIRclasses/class-eventorganiser-admin-page.php): failed to open stream: No such file or directory in wp-content/plugins/event-organiser/event-organiser-venues.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/event-organiser/event-organiser-edit.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/event-organiser/event-organiser-manage.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/event-organiser/classes/class-eo-calendar-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/event-organiser/templates/taxonomy-event-venue.php:20
    • > PHP Warning
      require_once(EVENT_ORGANISER_DIRclasses/class-eventorganiser-admin-page.php): failed to open stream: No such file or directory in wp-content/plugins/event-organiser/event-organiser-calendar.php on line 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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can look at the official readme.txt

event-organiser/event-organiser.php 92% from 13 tests

The main PHP file in "Event Organiser" ver. 3.12.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin144,974 lines of code in 134 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2818,84214,26975,063
PO File4320,94125,62852,934
PHP473,0775,27711,511
CSS154311,1635,459
YAML1007

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity40.29
▷ Minimum class complexity1.00
▷ Maximum class complexity180.00
Average method complexity4.99
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes00.00%
Methods207
▷ Static methods3717.87%
▷ Public methods19594.20%
▷ Protected methods83.86%
▷ Private methods41.93%
Functions251
▷ Named functions25099.60%
▷ Anonymous functions10.40%
Constants6
▷ Global constants6100.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
27 PNG files occupy 0.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/eo-pro-venue-cf.png10.36KB4.44KB▼ 57.12%
css/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
lib/leaflet/images/marker-icon.png1.43KB1.55KB0.00%
lib/leaflet/images/layers.png0.68KB1.05KB0.00%
css/images/ui-bg_flat_10_ffffff_40x100.png0.17KB0.08KB▼ 51.12%