78% fooevents-calendar

Code Review | Events Calendar by FooEvents

WordPress plugin Events Calendar by FooEvents scored78%from 54 tests.

About plugin

  • Plugin page: fooevents-calendar
  • Plugin version: 1.6.52
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 3, 2018
  • Latest release: Nov 6, 2023
  • Number of updates: 63
  • Update frequency: every 28.6 days
  • Top authors: fooevents (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /75,537 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.37MB] [CPU: ▼11.08ms] Passed 4 tests

An overview of server-side resources used by Events Calendar by FooEvents
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6244.04 ▲3.50
Dashboard /wp-admin3.73 ▲0.3939.34 ▼15.17
Posts /wp-admin/edit.php3.86 ▲0.5042.96 ▼6.99
Add New Post /wp-admin/post-new.php5.97 ▲0.0975.86 ▼22.83
Media Library /wp-admin/upload.php3.74 ▲0.5136.43 ▲0.69
Calendar Settings /wp-admin/admin.php?page=fooevents-settings3.7139.32

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 59 new files
Database: no new tables, 7 new options
New WordPress options
widget_fooevents_calendar_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Events Calendar by FooEvents
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲21515.06 ▲0.6831.68 ▲30.0236.51 ▼7.68
Dashboard /wp-admin2,251 ▲804.97 ▼0.6498.68 ▲7.2140.51 ▼0.55
Posts /wp-admin/edit.php2,164 ▲642.33 ▲0.3243.68 ▲1.6135.68 ▼1.13
Add New Post /wp-admin/post-new.php5,136 ▲3,59923.18 ▲0.11723.39 ▲34.3042.80 ▼8.86
Media Library /wp-admin/upload.php1,456 ▲564.41 ▲0.23100.93 ▲2.4742.04 ▼0.45
Calendar Settings /wp-admin/admin.php?page=fooevents-settings1,2062.1733.7238.21

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_fooevents_calendar_widget
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=fooevents-settings
    • > Warning in wp-content/plugins/fooevents-calendar/class-fooevents-calendar.php+3242
    session_start(): Cannot start session when headers already sent

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
Please take a closer look at the following
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/fooevents-calendar/templates/eventbrite-options.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_permalink() in wp-content/plugins/fooevents-calendar/templates/event.php:16
    • > PHP Fatal error
      require_once(): Failed opening required 'HttpClient.php' (include_path='.:/usr/share/php') in wp-content/plugins/fooevents-calendar/vendors/eventbrite/tests/ClientTest.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/fooevents-calendar/templates/calendar-options-layout.php:16
    • > PHP Warning
      require_once(HttpClient.php): failed to open stream: No such file or directory in wp-content/plugins/fooevents-calendar/vendors/eventbrite/tests/ClientTest.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/fooevents-calendar/templates/eventmetabox.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/fooevents-calendar/templates/list-of-events.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/fooevents-calendar/templates/calendar.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/fooevents-calendar/templates/calendar-options.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/fooevents-calendar/classes/class-fooevents-calendar-widget.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #7 (Using the FooEvents Calendar shortcode)
The official readme.txt might help

fooevents-calendar/fooevents-calendar.php Passed 13 tests

"Events Calendar by FooEvents" version 1.6.52's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
105 characters long description:
Display your events in a stylish calendar on your WordPress website using simple short codes and widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected22,411 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71,1022,43917,707
PHP161,3361,1323,016
CSS133423731,333
PO File1120123283
Markdown116035
YAML14020
JSON1009
XML1008

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity70.17
▷ Minimum class complexity1.00
▷ Maximum class complexity389.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods172
▷ Static methods00.00%
▷ Public methods16897.67%
▷ Protected methods00.00%
▷ Private methods42.33%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.71MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png113.51KB62.85KB▼ 44.63%
screenshot-4.png112.33KB69.27KB▼ 38.33%
screenshot-1.png112.90KB62.81KB▼ 44.37%
screenshot-6.png109.49KB63.25KB▼ 42.24%
images/fooevents-logo.png4.26KB2.07KB▼ 51.46%