84% minimalistic-event-manager

Code Review | Minimalistic Event Manager

WordPress plugin Minimalistic Event Manager scored84%from 54 tests.

About plugin

  • Plugin page: minimalistic-even...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Nov 2, 2012
  • Latest release: Aug 21, 2017
  • Number of updates: 47
  • Update frequency: every 37.3 days
  • Top authors: tar.gz (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /4,764 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼5.57ms] Passed 4 tests

An overview of server-side resources used by Minimalistic Event Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1740.92 ▲2.72
Dashboard /wp-admin3.47 ▲0.1245.32 ▼14.77
Posts /wp-admin/edit.php3.58 ▲0.2245.24 ▼3.70
Add New Post /wp-admin/post-new.php6.06 ▲0.1788.45 ▼6.53
Media Library /wp-admin/upload.php3.39 ▲0.1637.21 ▲3.46

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_mem_event_list
widget_theysaidso_widget
mem_post_types
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
mem_edit_mode

Browser metrics Passed 4 tests

Minimalistic Event Manager: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.35 ▼0.051.72 ▲0.0144.03 ▼0.78
Dashboard /wp-admin2,205 ▲285.66 ▲0.0982.86 ▼5.4941.75 ▲0.18
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0434.32 ▼1.4835.11 ▼1.57
Add New Post /wp-admin/post-new.php6,464 ▲4,93826.29 ▲3.42948.63 ▲283.5456.96 ▼5.49
Media Library /wp-admin/upload.php1,410 ▲134.25 ▲0.0495.17 ▼8.5543.69 ▼0.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_mem_event_list
    • widget_recent-comments
    • widget_theysaidso_widget
    • mem_edit_mode
    • mem_post_types

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/minimalistic-event-manager/widgets/event-list.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/minimalistic-event-manager/mem.php:468

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
3 plugin tags: events, time, dates

minimalistic-event-manager/mem.php 92% from 13 tests

The main PHP script in "Minimalistic Event Manager" version 1.1.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("minimalistic-event-manager.php" instead of "mem.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,171 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4378300712
JavaScript16564240
PO File25374159
CSS15160

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions1386.67%
▷ Anonymous functions213.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected