10% manags-events

Code Review | Events Calendar

WordPress plugin Events Calendar scored10%from 54 tests.

About plugin

  • Plugin page: manags-events
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Oct 16, 2013
  • Latest release: Jan 4, 2015
  • Number of updates: 18
  • Update frequency: every 24.8 days
  • Top authors: dianuj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /16,937 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
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/manags-events/events-widgets.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; Events_CalendarWidget has a deprecated constructor

Server metrics [RAM: ▼1.89MB] [CPU: ▼59.60ms] Passed 4 tests

Analyzing server-side resources used by Events Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.354.60 ▼40.35
Dashboard /wp-admin2.13 ▼1.226.39 ▼59.89
Posts /wp-admin/edit.php2.13 ▼1.236.01 ▼41.35
Add New Post /wp-admin/post-new.php2.13 ▼3.766.39 ▼96.82
Media Library /wp-admin/upload.php2.13 ▼1.105.13 ▼30.59
Events Categories /wp-admin/edit-tags.php?taxonomy=events_categories&post_type=events2.135.98
Add New /wp-admin/post-new.php?post_type=events2.136.91
Events /wp-admin/edit.php?post_type=events2.136.69

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

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

Browser metrics Passed 4 tests

Events Calendar: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲4114.24 ▲0.021.96 ▼0.0040.76 ▼3.39
Dashboard /wp-admin2,215 ▲385.51 ▼0.1484.01 ▼10.8679.80 ▲39.00
Posts /wp-admin/edit.php2,142 ▲421.98 ▲0.0339.50 ▲3.0232.46 ▼3.34
Add New Post /wp-admin/post-new.php1,574 ▲3723.10 ▲4.97659.27 ▲2.9090.66 ▲27.07
Media Library /wp-admin/upload.php1,429 ▲264.15 ▲0.00100.60 ▼8.7568.06 ▲22.43
Events Categories /wp-admin/edit-tags.php?taxonomy=events_categories&post_type=events1,3092.1225.3733.86
Add New /wp-admin/post-new.php?post_type=events2,6228.35213.00120.25
Events /wp-admin/edit.php?post_type=events1,1301.9034.0331.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/manags-events/events-widgets.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; Events_CalendarWidget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_widget_events_calendar
    • db_upgraded
    • widget_widget_events_slider
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% 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)
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=events
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/manags-events/events-widgets.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; Events_CalendarWidget has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=events
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/manags-events/events-slider-widget.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; Events_SliderWidget has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=events
    • > POST request to /wp-admin/admin-ajax.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Events_CalendarWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=events
    • > POST request to /wp-admin/admin-ajax.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Events_SliderWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=events
    • > Notice in wp-content/plugins/manags-events/events.php+156
    Trying to get property 'ID' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=events
    • > Notice in wp-content/plugins/manags-events/events.php+98
    Undefined index: event_start_date
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=events
    • > Notice in wp-content/plugins/manags-events/events.php+99
    Undefined index: event_end_date
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=events
    • > Notice in wp-content/plugins/manags-events/events.php+100
    Undefined index: event_from_time
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=events
    • > Notice in wp-content/plugins/manags-events/events.php+101
    Undefined index: event_to_time
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=events
    • > Notice in wp-content/plugins/manags-events/events.php+102
    Undefined index: event_address
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=events
    • > Notice in wp-content/plugins/manags-events/events.php+102
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/manags-events/events-widgets.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/manags-events/events.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/manags-events/events-shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/manags-events/events-slider-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/manags-events/single-events.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=events
    • > Network (severe)
    wp-content/themes/twentytwentyone/images/slider.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === manags-events === )
  • Screenshots: These screenshots need descriptions #5, #6, #7, #8 in manags-events/assets to your readme.txt
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Donate link: Please fix this invalid url: ""
The official readme.txt might help

manags-events/events.php 92% from 13 tests

The main PHP script in "Events Calendar" version 2.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("manags-events.php" instead of "events.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected3,211 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52002901,622
CSS256541,215
PHP57636374

PHP code Passed 2 tests

An short overview of 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.15
Average class complexity7.50
▷ Minimum class complexity6.00
▷ Maximum class complexity9.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
13 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
assets/css/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
assets/css/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
assets/css/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
assets/css/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%