10% nom-event-management

Code Review | Event Management Plugin

WordPress plugin Event Management Plugin scored10%from 54 tests.

About plugin

  • Plugin page: nom-event-management
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.8
  • WordPress version: 6.3.1
  • First release: Jan 4, 2014
  • Latest release: Jan 10, 2014
  • Number of updates: 7
  • Update frequency: every 0.9 days
  • Top authors: maksbd19 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,571 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
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/nom-event-management/index.php+35
    Use of undefined constant __FIEL__ - assumed '__FIEL__' (this will throw an Error in a future version of PHP)

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

Server-side resources used by Event Management Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.365.98 ▼43.85
Dashboard /wp-admin2.13 ▼1.226.49 ▼55.64
Posts /wp-admin/edit.php2.13 ▼1.236.15 ▼42.17
Add New Post /wp-admin/post-new.php2.13 ▼3.767.49 ▼94.32
Media Library /wp-admin/upload.php2.13 ▼1.105.56 ▼32.80
Event Tags /wp-admin/edit-tags.php?taxonomy=event_tag&post_type=event2.136.96
Event Categories /wp-admin/edit-tags.php?taxonomy=event_cat&post_type=event2.138.14
Add New Event /wp-admin/post-new.php?post_type=event2.135.68
All Events /wp-admin/edit.php?post_type=event2.137.29

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_nom-event-management-widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Event Management Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,000 ▲25414.76 ▲0.391.83 ▲0.0840.26 ▼8.16
Dashboard /wp-admin2,378 ▲1906.46 ▲0.66129.31 ▲15.3241.25 ▼3.51
Posts /wp-admin/edit.php2,285 ▲1963.32 ▲1.3653.75 ▲20.5632.90 ▼2.99
Add New Post /wp-admin/post-new.php1,577 ▲4423.18 ▲0.11679.14 ▲18.2638.08 ▼15.72
Media Library /wp-admin/upload.php1,423 ▲324.13 ▼0.1078.62 ▼14.8442.50 ▼1.93
Event Tags /wp-admin/edit-tags.php?taxonomy=event_tag&post_type=event1,4353.1641.6527.56
Event Categories /wp-admin/edit-tags.php?taxonomy=event_cat&post_type=event1,4573.0840.7827.09
Add New Event /wp-admin/post-new.php?post_type=event2,5848.20183.4372.86
All Events /wp-admin/edit.php?post_type=event1,2733.2453.7931.39

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
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/nom-event-management/index.php+35
    Use of undefined constant __FIEL__ - assumed '__FIEL__' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_nom-event-management-widget
    • can_compress_scripts

Smoke tests 50% 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
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=event
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/nom-event-management/index.php+35
    Use of undefined constant __FIEL__ - assumed '__FIEL__' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=event
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/nom-event-management/widget-boilerplate/plugin.php+122
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=event
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Nom_Event_Management::event_custom_post_example() should not be called statically
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=event
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Nom_Event_Management::initialize_cmb_meta_boxes() should not be called statically
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=event
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Nom_Event_Management::event_metaboxes() should not be called statically
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=event
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/nom-event-management/custom-metabox/init.php+762
    count(): Parameter must be an array or an object that implements Countable
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=event
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Nom_Event_Management::category() should not be called statically
    • > GET request to /wp-admin/post-new.php?post_type=event
    • > Deprecated in wp-includes/class-wp-hook.php+312
    Non-static method Nom_Event_Management::change_default_title() should not be called statically
    • > GET request to /wp-admin/edit.php?post_type=event
    • > Deprecated in wp-includes/class-wp-hook.php+312
    Non-static method Nom_Event_Management::custom_search_where() should not be called statically

SRP 50% 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 take a closer look at the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/nom-event-management/index.php:35
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/nom-event-management/widget-boilerplate/views/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/nom-event-management/custom-metabox/example-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/nom-event-management/widget-boilerplate/views/widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nom-event-management/widget-boilerplate/plugin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/nom-event-management/custom-metabox/init.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Screenshot #1 (screenshot-2.png is the screen shot of the plugin event post type screen from a working example.) image required
You can look at the official readme.txt

nom-event-management/index.php 92% from 13 tests

"Event Management Plugin" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nom-event-management.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,494 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP94566361,664
CSS4221441
JavaScript55390241
Markdown1280131
PO File10017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity40.57
▷ Minimum class complexity1.00
▷ Maximum class complexity156.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods105
▷ Static methods6561.90%
▷ Public methods9792.38%
▷ Protected methods00.00%
▷ Private methods87.62%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.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
16 compressed PNG files occupy 0.16MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
custom-metabox/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
custom-metabox/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
custom-metabox/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
custom-metabox/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
custom-metabox/images/ico-delete.png0.70KB0.72KB0.00%