83% events-block-for-the-events-calendar

Code Review | Events Block For The Events Calendar

WordPress plugin Events Block For The Events Calendar scored 83% from 54 tests.

About plugin

  • Plugin page: events-block-for-...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 15, 2022
  • Latest release: Feb 6, 2023
  • Number of updates: 8
  • Update frequency: every 41.4 days
  • Top authors: coolplugins (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 10,658 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▲4.54ms] Passed 4 tests

A check of server-side resources used by Events Block For The Events Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0252.20 ▲4.29
Dashboard /wp-admin3.38 ▲0.0756.61 ▲6.91
Posts /wp-admin/edit.php3.49 ▲0.1351.76 ▼0.78
Add New Post /wp-admin/post-new.php5.98 ▲0.09102.30 ▲12.03
Media Library /wp-admin/upload.php3.31 ▲0.0743.68 ▲7.74

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 48 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
ebec-v
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
ebec_activation_time

Browser metrics Passed 4 tests

A check of browser resources used by Events Block For The Events Calendar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▼113.17 ▼1.246.04 ▲3.5243.52 ▼5.64
Dashboard /wp-admin2,216 ▲104.88 ▲0.04111.70 ▲1.2141.40 ▼2.82
Posts /wp-admin/edit.php2,098 ▲92.03 ▲0.0239.93 ▼0.5938.25 ▲2.53
Add New Post /wp-admin/post-new.php1,524 ▼1823.48 ▲5.40603.56 ▼2.9751.93 ▼2.98
Media Library /wp-admin/upload.php1,401 ▲104.31 ▲0.08102.13 ▼6.0845.77 ▲3.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • ebec-v
    • widget_recent-comments
    • ebec_activation_time
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant EBEC_URL - assumed 'EBEC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/events-block-for-the-events-calendar/admin/feedback/admin-feedback-form.php on line 167
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ebec\\feedback\\add_action() in wp-content/plugins/events-block-for-the-events-calendar/admin/feedback/admin-feedback-form.php:18
    • > PHP Warning
      Use of undefined constant EBEC_VERSION - assumed 'EBEC_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/events-block-for-the-events-calendar/admin/feedback/admin-feedback-form.php on line 167

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: gutenberg block, block, event, the events calendar, events block...

events-block-for-the-events-calendar/events-block-for-the-event-calender.php 85% from 13 tests

"Events Block For The Events Calendar" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("events-block-for-the-events-calendar.php" instead of "events-block-for-the-event-calender.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected26,632 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JSON42022,516
JavaScript201482121,656
CSS42602471,155
PHP89792867
Sass13611360
SVG165078

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity12.75
▷ Minimum class complexity10.00
▷ Maximum class complexity18.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods24
▷ Static methods28.33%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
3 PNG files occupy 1.18MB with 0.86MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ebec-logo.png12.89KB3.97KB▼ 69.20%
dist/images/events.bb8bdf7c.png598.24KB151.32KB▼ 74.71%
src/Components/preview/events.png598.24KB151.32KB▼ 74.71%