72% registrations-for-the-events-calendar

Code Review | Registrations for the Events Calendar - Event Registration Plugin

WordPress plugin Registrations for the Events Calendar - Event Registration Plugin scored72%from 54 tests.

About plugin

  • Plugin page: registrations-for...
  • Plugin version: 2.11
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Oct 23, 2016
  • Latest release: Nov 7, 2023
  • Number of updates: 107
  • Update frequency: every 24.0 days
  • Top authors: roundupwp (50.47%)Craig at Smash Balloon (50.47%)

Code review

54 tests

User reviews

84 reviews

Install metrics

10,000+ active /276,049 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.67MB] [CPU: ▲4.88ms] Passed 4 tests

This is a short check of server-side resources used by Registrations for the Events Calendar - Event Registration Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.46 ▲0.9942.91 ▼0.83
Dashboard /wp-admin5.25 ▲1.9163.32 ▼0.32
Posts /wp-admin/edit.php5.31 ▲1.9571.08 ▲19.27
Add New Post /wp-admin/post-new.php7.79 ▲1.90100.91 ▲1.39
Media Library /wp-admin/upload.php5.12 ▲1.8854.54 ▲20.17
Email Settings /wp-admin/admin.php?page=rtec-email5.1650.48
Registrations /wp-admin/edit.php?post_type=tribe_events&page=registrations-for-the-events-calendar/_settings4.8042.41
Registrations /wp-admin/admin.php?page=registrations-for-the-events-calendar5.1648.32
Form Settings /wp-admin/admin.php?page=rtec-form5.1647.85
Support /wp-admin/admin.php?page=rtec-support5.1648.61

Server storage [IO: ▲3.02MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 115 new files
Database: 1 new table, 8 new options
New tables
wp_rtec_registrations
New WordPress options
db_upgraded
theysaidso_admin_options
rtec_options
widget_theysaidso_widget
rtec_db_version
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Registrations for the Events Calendar - Event Registration Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16713.85 ▼0.507.41 ▲5.6340.20 ▼6.62
Dashboard /wp-admin2,227 ▲505.62 ▼0.0297.69 ▲7.8839.27 ▼0.82
Posts /wp-admin/edit.php2,138 ▲382.01 ▲0.0640.27 ▲3.7935.89 ▲2.89
Add New Post /wp-admin/post-new.php1,558 ▲3223.52 ▲0.49669.41 ▲26.3859.61 ▲5.43
Media Library /wp-admin/upload.php1,435 ▲414.23 ▲0.0697.62 ▲1.0841.15 ▼0.52
Email Settings /wp-admin/admin.php?page=rtec-email8712.0524.2926.95
Registrations /wp-admin/edit.php?post_type=tribe_events&page=registrations-for-the-events-calendar/_settings280.410.113.95
Registrations /wp-admin/admin.php?page=registrations-for-the-events-calendar8712.0525.8527.34
Form Settings /wp-admin/admin.php?page=rtec-form8652.0523.7729.29
Support /wp-admin/admin.php?page=rtec-support8652.0526.1128.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 24× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/registrations-for-the-events-calendar/inc/admin/class-rtec-admin-registrations.php
    • > /wp-content/plugins/registrations-for-the-events-calendar/inc/admin/class-rtec-admin-event.php
    • > /wp-content/plugins/registrations-for-the-events-calendar/inc/form/class-rtec-form.php
    • > /wp-content/plugins/registrations-for-the-events-calendar/inc/admin/templates/registrations.php
    • > /wp-content/plugins/registrations-for-the-events-calendar/templates/email/button-generic.php
    • > /wp-content/plugins/registrations-for-the-events-calendar/inc/class-rtec-db.php
    • > /wp-content/plugins/registrations-for-the-events-calendar/inc/class-rtec-validator.php
    • > /wp-content/plugins/registrations-for-the-events-calendar/inc/services/class-rtec-placeholder-service.php
    • > /wp-content/plugins/registrations-for-the-events-calendar/inc/helper-functions.php
    • > /wp-content/plugins/registrations-for-the-events-calendar/inc/class-rtec-email.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'RTEC\\Helpers\\PluginSilentUpgraderSkin' not found in wp-content/plugins/registrations-for-the-events-calendar/inc/admin/class-install-skin.php:11
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader.php): failed to open stream: No such file or directory in wp-content/plugins/registrations-for-the-events-calendar/inc/helpers/PluginSilentUpgrader.php on line 10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/registrations-for-the-events-calendar/inc/helpers/PluginSilentUpgraderSkin.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader-skin.php' (include_path='.:/usr/share/php') in wp-content/plugins/registrations-for-the-events-calendar/inc/helpers/PluginSilentUpgraderSkin.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader.php' (include_path='.:/usr/share/php') in wp-content/plugins/registrations-for-the-events-calendar/inc/helpers/PluginSilentUpgrader.php on line 10
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader-skin.php): failed to open stream: No such file or directory in wp-content/plugins/registrations-for-the-events-calendar/inc/helpers/PluginSilentUpgraderSkin.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/registrations-for-the-events-calendar/inc/admin/admin-functions.php:70
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/registrations-for-the-events-calendar/inc/helpers/PluginSilentUpgrader.php on line 10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=tribe_events&page=registrations-for-the-events-calendar/_settings
    • > Network (severe)
    wp-admin/edit.php?post_type=tribe_events&page=registrations-for-the-events-calendar/_settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: rsvp, the events calendar, registration, event registration, events

registrations-for-the-events-calendar/registrations-for-the-events-calendar.php 92% from 13 tests

This is the main PHP file of "Registrations for the Events Calendar - Event Registration Plugin" version 2.11, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin29,400 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
PO File146,3518,62914,298
PHP552,1331,98011,488
CSS479812,003
JavaScript72411141,595
SVG1009
XML1007

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity43.92
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity4.93
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes14.00%
Methods273
▷ Static methods259.16%
▷ Public methods25091.58%
▷ Protected methods134.76%
▷ Private methods103.66%
Functions107
▷ Named functions107100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants1285.71%
▷ Class constants214.29%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 1.28MB with 0.79MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/admin/pro-features/email-selected.png115.53KB39.70KB▼ 65.64%
img/tec-icon.png11.94KB6.96KB▼ 41.71%
img/admin/pro-features/transfer-selected.png203.73KB56.24KB▼ 72.39%
img/admin/pro-features/payments.png209.58KB54.73KB▼ 73.89%
img/form-gb-block.png5.08KB2.28KB▼ 55.14%