72% the-events-calendar-shortcode

Code Review | The Events Calendar Shortcode & Block

WordPress plugin The Events Calendar Shortcode & Block scored72%from 54 tests.

About plugin

  • Plugin page: the-events-calend...
  • Plugin version: 2.8.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Oct 10, 2014
  • Latest release: Nov 20, 2023
  • Number of updates: 178
  • Update frequency: every 18.7 days
  • Top authors: brianhogg (84.27%)dandelionweb (16.29%)

Code review

54 tests

User reviews

71 reviews

Install metrics

20,000+ active /604,195 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼7.11ms] Passed 4 tests

An overview of server-side resources used by The Events Calendar Shortcode & Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1639.36 ▼2.02
Dashboard /wp-admin3.45 ▲0.1148.18 ▼14.64
Posts /wp-admin/edit.php3.57 ▲0.2141.84 ▼7.85
Add New Post /wp-admin/post-new.php6.04 ▲0.1588.34 ▼3.94
Media Library /wp-admin/upload.php3.38 ▲0.1533.94 ▲2.62
Welcome to The Events Calendar Shortcode & Block /wp-admin/index.php?page=the-events-calendar-shortcode-getting-started3.5736.24

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
ecs_activation_date

Browser metrics Passed 4 tests

An overview of browser requirements for The Events Calendar Shortcode & Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.31 ▼0.401.71 ▲0.0244.37 ▲0.93
Dashboard /wp-admin2,198 ▲205.62 ▲0.0083.47 ▼34.5940.26 ▼3.39
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0136.25 ▼0.7630.80 ▼4.69
Add New Post /wp-admin/post-new.php1,546 ▲1223.16 ▼1.77579.89 ▼16.7851.02 ▼9.07
Media Library /wp-admin/upload.php1,397 ▲34.19 ▼0.0598.92 ▼1.5742.76 ▼2.50
Welcome to The Events Calendar Shortcode & Block /wp-admin/index.php?page=the-events-calendar-shortcode-getting-started1,6528.81269.2392.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • ecs_activation_date
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/the-events-calendar-shortcode/templates/getting-started.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/the-events-calendar-shortcode/templates/admin-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-events-calendar-shortcode/block/init.php:97
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/the-events-calendar-shortcode/templates/getting-started.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-events-calendar-shortcode/includes/notices/rating.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-events-calendar-shortcode/includes/ajax-endpoints.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/index.php?page=the-events-calendar-shortcode-getting-started
    • > Other (warning) in unknown
    /wp-admin/index.php?page=the-events-calendar-shortcode-getting-started 151 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: shortcode, calendar, the events calendar, events, event

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

"The Events Calendar Shortcode & Block" version 2.8.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("5.8.6" instead of "5.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,635 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript251822221,138
PHP7164102985
CSS6920336
Sass14110163
JSON10013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity40.00
▷ Minimum class complexity15.00
▷ Maximum class complexity65.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.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
6 PNG files occupy 0.66MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/images/the-events-calendar-block.png38.75KB9.21KB▼ 76.24%
static/the-events-calendar-shortcode-columns-photo-horizontal-design.png72.82KB26.72KB▼ 63.31%
static/images/barry-harris.png30.93KB11.57KB▼ 62.61%
static/event-calendar-shortcode-compact-design.png35.01KB35.35KB0.00%
static/the-events-calendar-shortcode-grouped-design.png99.88KB30.43KB▼ 69.53%