77% template-events-calendar

Code Review | Events Shortcodes For The Events Calendar

WordPress plugin Events Shortcodes For The Events Calendar scored77%from 54 tests.

About plugin

  • Plugin page: template-events-c...
  • Plugin version: 2.3.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: May 1, 2017
  • Latest release: Nov 7, 2023
  • Number of updates: 153
  • Update frequency: every 15.6 days
  • Top authors: Narinder singh (99.35%)satindersingh (1.31%)

Code review

54 tests

User reviews

183 reviews

Install metrics

10,000+ active /321,993 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.12MB] [CPU: ▲7.27ms] 75% from 4 tests

Server-side resources used by Events Shortcodes For The Events Calendar
It is recommended to improve the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,005.38ms on /wp-admin/admin.php?page=cool-plugins-events-addon)
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5144.26 ▲3.07
Dashboard /wp-admin4.66 ▲1.3558.90 ▲10.05
Posts /wp-admin/edit.php4.71 ▲1.3556.35 ▲5.26
Add New Post /wp-admin/post-new.php9.64 ▲3.75110.80 ▲10.69
Media Library /wp-admin/upload.php4.52 ▲1.2849.73 ▲15.34
Shortcodes Settings /wp-admin/admin.php?page=tribe_events-events-template-settings7.3851.59
Dashboard /wp-admin/admin.php?page=cool-plugins-events-addon4.611,005.38

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 205 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-posts
cool-plugins-events-addon-the-events-calendar-pro
cool-plugins-events-addon-the-events-calendar
ect-type
db_upgraded
can_compress_scripts
widget_theysaidso_widget
ects_options
theysaidso_admin_options
widget_recent-comments
...

Browser metrics 75% from 4 tests

A check of browser resources used by Events Shortcodes For The Events Calendar
You may want to improve the following
  • Nodes: You must limit the number of DOM nodes under 25,000 (currently 25,887 on /wp-admin/admin.php?page=tribe_events-events-template-settings)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8114.33 ▼0.011.74 ▼0.0844.57 ▼3.02
Dashboard /wp-admin2,227 ▲535.58 ▼0.0488.17 ▼10.5041.58 ▼5.41
Posts /wp-admin/edit.php2,141 ▲411.98 ▼0.0539.94 ▲3.1536.98 ▲1.99
Add New Post /wp-admin/post-new.php1,793 ▲26726.34 ▲2.63655.70 ▼53.6036.63 ▼18.34
Media Library /wp-admin/upload.php1,432 ▲294.21 ▲0.0198.23 ▼21.2741.27 ▼6.20
Shortcodes Settings /wp-admin/admin.php?page=tribe_events-events-template-settings25,8877.561,491.4162.79
Dashboard /wp-admin/admin.php?page=cool-plugins-events-addon1,6132.0925.1148.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 9 options in the database
    • cool-plugins-events-addon-the-events-calendar
    • theysaidso_admin_options
    • db_upgraded
    • ects_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • cool-plugins-events-addon-the-events-calendar-pro
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/template-events-calendar/admin/ect-event-shortcode.php
    • > /wp-content/plugins/template-events-calendar/admin/ect-codestar-settings.php
    • > /wp-content/plugins/template-events-calendar/admin/events-addon-page/includes/cool_plugins_downloader.php
  • 22× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tribe_get_start_date() in wp-content/plugins/template-events-calendar/templates/list/list.php:2
    • > PHP Notice
      Undefined variable: template in wp-content/plugins/template-events-calendar/templates/timeline/timeline.php on line 6
    • > PHP Notice
      Undefined variable: template in wp-content/plugins/template-events-calendar/templates/timeline/timeline.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/template-events-calendar/templates/timeline/timeline.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tinycolor() in wp-content/plugins/template-events-calendar/templates/list/list-css.php:138
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/template-events-calendar/admin/visual-composer/ect-class-vc.php:12
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/template-events-calendar/templates/timeline/timeline-css.php on line 6
    • > PHP Notice
      Undefined variable: featured_event_font_color in wp-content/plugins/template-events-calendar/templates/minimal-list/minimal-list-css.php on line 121
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tribe_get_start_date() in wp-content/plugins/template-events-calendar/templates/minimal-list/minimal-list.php:2
    • > PHP Fatal error
      Trait 'TinyColor\\Traits\\Convert' not found in wp-content/plugins/template-events-calendar/includes/ect-tinycolor/Color.php on line 10

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: event calendar, booking, coolplugins, event manager, shortcode...

template-events-calendar/events-calendar-templates.php 77% from 13 tests

"Events Shortcodes For The Events Calendar" version 2.3.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("template-events-calendar.php" instead of "events-calendar-templates.php")
  • Description: The description should be shorter than 140 characters (currently 196 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected34,652 lines of code in 150 files:
LanguageFilesBlank linesComment linesLines of code
PHP611,7241,2648,466
JavaScript191,3695327,233
CSS195476036,551
PO File203,1983,5916,500
Sass1797135,778
SVG1365089
JSON10035

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity27.46
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity5.62
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces3
Interfaces0
Traits4
Classes37
▷ Abstract classes25.41%
▷ Concrete classes3594.59%
▷ Final classes25.71%
Methods234
▷ Static methods5824.79%
▷ Public methods21692.31%
▷ Protected methods125.13%
▷ Private methods62.56%
Functions45
▷ Named functions4395.56%
▷ Anonymous functions24.44%
Constants8
▷ Global constants337.50%
▷ Class constants562.50%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
19 PNG files occupy 0.35MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/events-addon-page/assets/images/events-search-addon-for-the-events-calendar.png10.59KB3.76KB▼ 64.51%
admin/events-addon-page/assets/images/events-widgets-for-elementor-and-the-events-calendar.png16.05KB4.20KB▼ 73.84%
assets/images/ect-icon.png4.59KB2.16KB▼ 53.05%
admin/events-addon-page/assets/images/the-events-calendar-countdown-addon.png11.88KB4.09KB▼ 65.54%
admin/events-addon-page/assets/images/events-block-for-the-events-calendar.png12.89KB3.97KB▼ 69.20%