51% events-calendar-registration-booking-by-events-plus

Code Review | Events Calendar Registration

WordPress plugin Events Calendar Registration scored 51% from 54 tests.

About plugin

  • Plugin page: events-calendar-r...
  • Plugin version: 1.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 5.9.2
  • First release: Mar 16, 2017
  • Latest release: Mar 14, 2021
  • Number of updates: 28
  • Update frequency: every 51.8 days
  • Top authors: elbisnero (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

80+ active / 9,375 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲3.49MB] [CPU: ▼328.85ms] Passed 4 tests

An overview of server-side resources used by Events Calendar Registration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /7.87 ▲4.3524.48 ▼35.66
Dashboard /wp-admin7.88 ▲4.4725.74 ▼16.28
Posts /wp-admin/edit.php7.89 ▲4.2429.82 ▼8.31
Add New Post /wp-admin/post-new.php7.89 ▲0.9124.30 ▼1,255.15
Media Library /wp-admin/upload.php7.89 ▲4.5924.20 ▼0.46
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius7.8930.44

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 643 new files
Database: 8 new tables, 27 new options
New tables
wp_evr_category
wp_evr_event
wp_evr_attendee
wp_eventplusmeta
wp_evr_question
wp_evr_cost
wp_evr_payment
wp_evr_answer
New WordPress options
evr_date_installed
wpeventsplus_lite
plug-evr-activate
evr_attendee_version
evr_payment
eventpluslite_build_version
eventslite_admin_flash_messages
evr_attendee
evr_question
evr_answer
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Events Calendar Registration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,073 ▲31916.49 ▲0.8311.48 ▲5.272.35 ▼0.36
Dashboard /wp-admin3,022 ▲1645.98 ▼0.25123.56 ▼13.53174.99 ▲8.01
Posts /wp-admin/edit.php2,729 ▲413.23 ▼0.0071.01 ▲3.17145.09 ▼58.73
Add New Post /wp-admin/post-new.php1,727 ▲6621.84 ▲0.47476.27 ▲79.63160.87 ▼5.12
Media Library /wp-admin/upload.php1,742 ▲505.63 ▲0.15148.51 ▼19.31213.25 ▼12.89
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius1,4662.5455.32157.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/models/settings.php+12
    Trying to access array offset on value of type bool
  • Zombie tables detected upon uninstall: 8 tables
    • wp_evr_attendee
    • wp_evr_answer
    • wp_evr_cost
    • wp_evr_event
    • wp_evr_category
    • wp_eventplusmeta
    • wp_evr_question
    • wp_evr_payment
  • Zombie WordPress options detected upon uninstall: 28 options
    • evr_payment
    • evr_payment_version
    • evr_answer
    • fs_accounts
    • fs_active_plugins
    • evr_cost_version
    • evr_attendee_version
    • evr_eventplusmeta
    • eventpluslite_build_version
    • evr_eventplusmeta_version
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Notice in wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/models/settings.php+13
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 23× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/events-calendar-registration-booking-by-events-plus/assets/font/helveticai.php
    • > /wp-content/plugins/events-calendar-registration-booking-by-events-plus/assets/font/timesb.php
    • > /wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/app/views/admin/dashboard/index.php
    • > /wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/app/views/front/event/parts/inc/form_fields/textarea.php
    • > /wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/app/views/admin/events/form.parts/edit_event_scripts.php
    • > /wp-content/plugins/events-calendar-registration-booking-by-events-plus/assets/scripts/public/_validate.js.php
    • > /wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/vendor/fpdf.php
    • > /wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/app/views/front/event/parts/inc/form_fields/text.php
    • > /wp-content/plugins/events-calendar-registration-booking-by-events-plus/assets/font/zapfdingbats.php
    • > /wp-content/plugins/events-calendar-registration-booking-by-events-plus/assets/font/timesi.php
  • 328× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/app/views/admin/dashboard/widgets/categories.php:7
    • > PHP Notice
      Undefined variable: row in wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/app/views/admin/attendees/details.php on line 21
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/app/views/admin/layouts/payments.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/app/views/front/event/parts/inc/form_fields/dropdown.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'EventPlus_Helpers_Funx' not found in wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/funx/evrplus_three_cal.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'EventPlus_Abstract_Request' not found in wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/request.php:2
    • > PHP Notice
      Undefined variable: oEvent in wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/app/views/admin/events/items/manage.php on line 3
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/app/views/front/event/parts/inc/form_fields/dropdown.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/app/views/admin/attendees/details.php on line 20
    • > PHP Notice
      Undefined variable: event_id in wp-content/plugins/events-calendar-registration-booking-by-events-plus/eventplus/app/views/front/widgets/shortcode/event/popup/events.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 27 tag instead of maximum 10
Please take inspiration from this readme.txt

events-calendar-registration-booking-by-events-plus/eventslite.php 77% from 13 tests

The main PHP script in "Events Calendar Registration" version 1.9.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 196 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("events-calendar-registration-booking-by-events-plus.php" instead of "eventslite.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected117,772 lines of code in 428 files:
LanguageFilesBlank linesComment linesLines of code
PHP29110,41118,05647,664
CSS512,8272,24844,858
PO File126,5357,91414,203
JavaScript361,7381,0325,964
Sass28399772,515
SVG3001,812
HTML11210495
Markdown1610192
JSON20037
YAML22028
INI1004

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,360)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity37.33
▷ Minimum class complexity1.00
▷ Maximum class complexity2,360.00
Average method complexity3.66
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes132
▷ Abstract classes118.33%
▷ Concrete classes12191.67%
▷ Final classes00.00%
Methods1,843
▷ Static methods26214.22%
▷ Public methods1,47079.76%
▷ Protected methods573.09%
▷ Private methods31617.15%
Functions162
▷ Named functions162100.00%
▷ Anonymous functions00.00%
Constants167
▷ Global constants12876.65%
▷ Class constants3923.35%
▷ Public constants39100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
115 PNG files occupy 2.43MB with 1.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/scripts/gridview/css/icons/broken-image.png0.26KB0.17KB▼ 33.33%
assets/images/free_icon.png0.88KB0.84KB▼ 4.01%
assets/scripts/colorbox/images/overlay.png49.08KB0.14KB▼ 99.71%
assets/images/search-icon.png48.27KB0.29KB▼ 99.39%
assets/images/question-frame.png0.90KB0.86KB▼ 4.65%