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: 5.9.2
  • 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

400+ active / 11,082 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/another-events-calendar/widgets/search/search.php+160
    Function create_function() is deprecated

Server metrics [RAM: ▼1.15MB] [CPU: ▼338.49ms] Passed 4 tests

Server-side resources used by Another Events Calendar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.23 ▼0.299.98 ▼43.58
Dashboard /wp-admin3.25 ▼0.1610.94 ▼28.27
Posts /wp-admin/edit.php3.25 ▼0.399.50 ▼30.03
Add New Post /wp-admin/post-new.php3.25 ▼3.7510.30 ▼1,252.09
Media Library /wp-admin/upload.php3.25 ▼0.059.67 ▼21.34
Organizers /wp-admin/edit.php?post_type=aec_organizers3.2510.05
Settings /wp-admin/edit.php?post_type=aec_events&page=aec_settings3.2511.00
Event Categories /wp-admin/edit-tags.php?taxonomy=aec_categories&post_type=aec_events3.2510.76
Add New /wp-admin/post-new.php?post_type=aec_events3.259.47
Venues /wp-admin/edit.php?post_type=aec_venues3.2515.40
Event Tags /wp-admin/edit-tags.php?taxonomy=aec_tags&post_type=aec_events3.259.43
Recurring Events /wp-admin/edit.php?post_type=aec_recurring_events3.259.36
All Events /wp-admin/edit.php?post_type=aec_events3.259.94

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 126 new files
Database: no new tables, 14 new options
New WordPress options
aec_currency_settings
aec_socialshare_settings
widget_aec-widget-upcoming-events
widget_aec-widget-mini-calendar
aec_version
aec_general_settings
aec_calendar_settings
aec_page_settings
aec_map_settings
aec_events_settings
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Another Events Calendar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,936 ▲18216.61 ▲0.835.68 ▼1.342.61 ▲0.07
Dashboard /wp-admin2,987 ▲1267.28 ▲1.16132.98 ▼1.77170.92 ▲2.55
Posts /wp-admin/edit.php2,756 ▲683.51 ▲0.2770.28 ▲8.25142.00 ▲1.39
Add New Post /wp-admin/post-new.php1,708 ▼4422.42 ▲1.48426.74 ▼22.74161.25 ▲1.46
Media Library /wp-admin/upload.php1,795 ▲976.21 ▲0.72131.79 ▼15.64188.09 ▼105.36
Organizers /wp-admin/edit.php?post_type=aec_organizers1,5213.5367.17121.82
Settings /wp-admin/edit.php?post_type=aec_events&page=aec_settings2,5713.3063.23117.49
Event Categories /wp-admin/edit-tags.php?taxonomy=aec_categories&post_type=aec_events1,7263.2163.02114.73
Add New /wp-admin/post-new.php?post_type=aec_events6,61913.35282.51412.90
Venues /wp-admin/edit.php?post_type=aec_venues1,4903.3767.78111.25
Event Tags /wp-admin/edit-tags.php?taxonomy=aec_tags&post_type=aec_events1,6843.4164.2698.48
Recurring Events /wp-admin/edit.php?post_type=aec_recurring_events1,5583.5067.72118.31
All Events /wp-admin/edit.php?post_type=aec_events1,5533.5469.44116.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/another-events-calendar/widgets/search/search.php+160
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 4 options
    • widget_aec-widget-past-events
    • widget_aec-widget-search
    • widget_aec-widget-upcoming-events
    • widget_aec-widget-mini-calendar

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 56 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=aec_events
    • > POST request to /wp-admin/admin-ajax.php
    • > 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/another-events-calendar/public/partials/tags/aec-public-tag-header-display.php
    • > /wp-content/plugins/another-events-calendar/public/partials/categories/aec-public-category-header-display.php
  • 65× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/another-events-calendar/public/partials/events/aec-public-events-table-display.php:42
    • > PHP Notice
      Undefined variable: aec_query in wp-content/plugins/another-events-calendar/public/partials/events/aec-public-events-table-display.php on line 42
    • > PHP Notice
      Undefined variable: has_header in wp-content/plugins/another-events-calendar/public/partials/events/aec-public-events-blog-display.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/another-events-calendar/admin/partials/venues/aec-admin-venues-display.php:12
    • > PHP Notice
      Undefined variable: month in wp-content/plugins/another-events-calendar/widgets/mini-calender/views/widget.php on line 23
    • > PHP Notice
      Undefined variable: year in wp-content/plugins/another-events-calendar/widgets/mini-calender/views/widget.php on line 12
    • > PHP Notice
      Undefined variable: description in wp-content/plugins/another-events-calendar/public/partials/organizers/aec-public-organizer-header-display.php on line 27
    • > PHP Notice
      Undefined variable: widget_id in wp-content/plugins/another-events-calendar/widgets/upcoming-events/views/widget.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function aec_organizer_form_page_link() in wp-content/plugins/another-events-calendar/public/partials/user/aec-public-edit-organizer-display.php:9
    • > PHP Notice
      Undefined variable: widget_id in wp-content/plugins/another-events-calendar/widgets/mini-calender/views/widget.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > 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=5.9.2 65:174 "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

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: map, booking, calendar, events, venue...

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

The principal PHP file in "Another Events Calendar" v. 1.7.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 240 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
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 logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
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

PNG files should be compressed to save space and 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/m2.png3.18KB2.36KB▼ 25.77%
public/images/m1.png2.93KB2.20KB▼ 25.07%
public/images/placeholder-profile.png7.40KB2.00KB▼ 73.04%
public/images/m5.png6.68KB5.10KB▼ 23.66%
public/images/m4.png5.57KB4.23KB▼ 24.08%