84% the-events-calendar-registration

Code Review | The Events Calendar Gravity Forms Registration

WordPress plugin The Events Calendar Gravity Forms Registration scored84%from 54 tests.

About plugin

  • Plugin page: the-events-calend...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.9.1
  • WordPress version: 6.3.1
  • First release: Apr 18, 2014
  • Latest release: Sep 18, 2018
  • Number of updates: 31
  • Update frequency: every 52.1 days
  • Top authors: Fastmover (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,085 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.12ms] Passed 4 tests

This is a short check of server-side resources used by The Events Calendar Gravity Forms Registration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.00 ▼0.72
Dashboard /wp-admin3.31 ▲0.0046.14 ▲1.04
Posts /wp-admin/edit.php3.36 ▲0.0046.59 ▼2.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.26 ▼2.62
Media Library /wp-admin/upload.php3.23 ▲0.0032.92 ▲1.13

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for The Events Calendar Gravity Forms Registration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.491.69 ▼0.0641.49 ▼0.95
Dashboard /wp-admin2,206 ▲184.89 ▼0.98108.14 ▲4.4342.26 ▼5.04
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0138.87 ▲2.5535.23 ▼1.09
Add New Post /wp-admin/post-new.php1,534 ▲123.30 ▲0.01574.66 ▼103.2350.31 ▼7.44
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.0196.07 ▼5.8240.57 ▼3.79

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/the-events-calendar-registration/trunk/ecgf.php:507
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/the-events-calendar-registration/ecgf.php:507

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === the-events-calendar-registration === )
You can take inspiration from this readme.txt

the-events-calendar-registration/ecgf.php 92% from 13 tests

The main PHP script in "The Events Calendar Gravity Forms Registration" version 1.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("the-events-calendar-registration.php" instead of "ecgf.php")

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
Good job! No executable or dangerous file extensions detected607 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28472590
Markdown16017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity21.50
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods34
▷ Static methods2058.82%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png48.84KB17.50KB▼ 64.17%
trunk/assets/screenshot-2.png21.77KB6.21KB▼ 71.48%
trunk/assets/screenshot-3.png48.84KB17.50KB▼ 64.17%
assets/screenshot-2.png21.77KB6.21KB▼ 71.48%
assets/screenshot-1.png14.89KB4.34KB▼ 70.85%