10% another-events-calendar

Code Review | Another Events Calendar

WordPress plugin Another Events Calendar scored 10% from 54 tests.

About plugin

  • Plugin page: another-events-ca...
  • Plugin version: 1.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-4.8
  • WordPress version: 6.3.1
  • First release: Aug 17, 2016
  • Latest release: Jun 14, 2017
  • Number of updates: 17
  • Update frequency: every 17.9 days
  • Top authors: Yendif Player (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

200+ active / 11,559 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/another-events-calendar/widgets/search/search.php+160
    Function create_function() is deprecated

Server metrics [RAM: ▼0.56MB] [CPU: ▼44.88ms] Passed 4 tests

Analyzing server-side resources used by Another Events Calendar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0411.52 ▼33.71
Dashboard /wp-admin3.45 ▲0.1414.77 ▼38.06
Posts /wp-admin/edit.php3.45 ▲0.0917.01 ▼30.84
Add New Post /wp-admin/post-new.php3.45 ▼2.4414.24 ▼76.91
Media Library /wp-admin/upload.php3.45 ▲0.2214.80 ▼21.43
Event Tags /wp-admin/edit-tags.php?taxonomy=aec_tags&post_type=aec_events3.4517.67
Settings /wp-admin/edit.php?post_type=aec_events&page=aec_settings3.4513.61
Organizers /wp-admin/edit.php?post_type=aec_organizers3.4513.98
Venues /wp-admin/edit.php?post_type=aec_venues3.4514.34
All Events /wp-admin/edit.php?post_type=aec_events3.4515.33
Event Categories /wp-admin/edit-tags.php?taxonomy=aec_categories&post_type=aec_events3.4517.05
Recurring Events /wp-admin/edit.php?post_type=aec_recurring_events3.4514.96
Add New /wp-admin/post-new.php?post_type=aec_events3.4513.79

Server storage [IO: ▲1.06MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 126 new files
Database: no new tables, 20 new options
New WordPress options
aec_general_settings
widget_aec-widget-upcoming-events
can_compress_scripts
aec_calendar_settings
aec_version
widget_theysaidso_widget
widget_recent-comments
widget_aec-widget-search
widget_aec-widget-mini-calendar
theysaidso_admin_options
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Another Events Calendar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲18514.66 ▼0.121.97 ▼0.0338.49 ▼9.24
Dashboard /wp-admin2,280 ▲895.98 ▲1.08137.15 ▲27.4644.32 ▲3.41
Posts /wp-admin/edit.php2,172 ▲832.66 ▲0.6848.50 ▲12.9935.37 ▲0.75
Add New Post /wp-admin/post-new.php1,462 ▼7418.57 ▼4.60603.87 ▼80.2830.26 ▼25.09
Media Library /wp-admin/upload.php1,471 ▲865.12 ▲0.83102.64 ▼4.0842.18 ▼4.82
Event Tags /wp-admin/edit-tags.php?taxonomy=aec_tags&post_type=aec_events1,3202.4839.2028.39
Settings /wp-admin/edit.php?post_type=aec_events&page=aec_settings2,2872.6538.9933.85
Organizers /wp-admin/edit.php?post_type=aec_organizers1,1352.6941.8027.06
Venues /wp-admin/edit.php?post_type=aec_venues1,1352.7438.2327.71
All Events /wp-admin/edit.php?post_type=aec_events1,2002.6639.9732.98
Event Categories /wp-admin/edit-tags.php?taxonomy=aec_categories&post_type=aec_events1,3482.4938.9430.61
Recurring Events /wp-admin/edit.php?post_type=aec_recurring_events1,2062.6841.0730.12
Add New /wp-admin/post-new.php?post_type=aec_events5,0729.08301.79219.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/another-events-calendar/widgets/search/search.php+160
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 10 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_aec-widget-past-events
    • widget_aec-widget-mini-calendar
    • can_compress_scripts
    • widget_aec-widget-search
    • widget_aec-widget-upcoming-events
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 48 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=aec_events
    • > Deprecated in wp-content/plugins/another-events-calendar/widgets/mini-calender/mini-calendar.php+288
    Function create_function() is deprecated

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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/another-events-calendar/public/partials/categories/aec-public-category-header-display.php
    • > /wp-content/plugins/another-events-calendar/public/partials/tags/aec-public-tag-header-display.php
  • 65× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: phone in wp-content/plugins/another-events-calendar/public/partials/organizers/aec-public-organizer-header-display.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/another-events-calendar/admin/partials/settings/aec-admin-settings-display.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function date_i18n() in wp-content/plugins/another-events-calendar/widgets/mini-calender/views/widget.php:37
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/another-events-calendar/widgets/upcoming-events/views/form.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/another-events-calendar/admin/partials/recurring-events/aec-admin-recurring-settings-display.php:12
    • > PHP Notice
      Undefined variable: widget_id in wp-content/plugins/another-events-calendar/widgets/mini-calender/views/widget.php on line 32
    • > PHP Notice
      Undefined variable: description in wp-content/plugins/another-events-calendar/public/partials/events/aec-public-single-event-display.php on line 23
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/another-events-calendar/widgets/search/views/form.php:9
    • > PHP Notice
      Undefined variable: aec_query in wp-content/plugins/another-events-calendar/widgets/upcoming-events/views/widget.php on line 9
    • > PHP Notice
      Undefined variable: year in wp-content/plugins/another-events-calendar/widgets/mini-calender/views/widget.php on line 15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=aec_events
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?v=3.exp&ver=6.3.1 208:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
    • > GET request to /wp-admin/post-new.php?post_type=aec_events
    • > Console-api (severe) in unknown
    https://maps.googleapis.com/maps/api/js?v=3.exp&ver=6.3.1 128:245 "Geocoding Service: You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account"

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: events, event management, event, map, venue...

another-events-calendar/another-events-calendar.php 92% from 13 tests

The main PHP file in "Another Events Calendar" ver. 1.7.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 240 characters long)

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
Everything looks great! No dangerous files found in this plugin18,141 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PHP672,5992,2989,491
CSS370147,131
JavaScript54416411,231
SVG100288

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity32.79
▷ Minimum class complexity1.00
▷ Maximum class complexity145.00
Average method complexity6.78
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods154
▷ Static methods21.30%
▷ Public methods14896.10%
▷ Protected methods00.00%
▷ Private methods63.90%
Functions41
▷ Named functions41100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/m3.png3.86KB3.06KB▼ 20.80%
public/images/m1.png2.93KB2.20KB▼ 25.07%
public/images/m4.png5.57KB4.23KB▼ 24.08%
public/images/placeholder-profile.png7.40KB2.00KB▼ 73.04%
public/images/m2.png3.18KB2.36KB▼ 25.77%