84% am-events

Code Review | AM Events

WordPress plugin AM Events scored84%from 54 tests.

About plugin

  • Plugin page: am-events
  • Plugin version: 1.13.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-4.8.3
  • WordPress version: 6.3.1
  • First release: May 5, 2013
  • Latest release: Nov 14, 2017
  • Number of updates: 227
  • Update frequency: every 7.3 days
  • Top authors: Moisture (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /12,762 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.42MB] [CPU: ▲2.72ms] Passed 4 tests

Server-side resources used by AM Events
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4440.09 ▲0.24
Dashboard /wp-admin3.72 ▲0.4249.14 ▲0.69
Posts /wp-admin/edit.php3.85 ▲0.4953.05 ▲8.34
Add New Post /wp-admin/post-new.php6.30 ▲0.4299.51 ▲3.69
Media Library /wp-admin/upload.php3.64 ▲0.4137.13 ▲6.24
All Events /wp-admin/edit.php?post_type=am_event3.7039.72
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=am_event3.6336.18
AM Events /wp-admin/options-general.php?page=am-events-settings3.6131.18
Event Categories /wp-admin/edit-tags.php?taxonomy=am_event_categories&post_type=am_event3.6334.15
Venues /wp-admin/edit-tags.php?taxonomy=am_venues&post_type=am_event3.6340.34
Add New Event /wp-admin/post-new.php?post_type=am_event3.7753.90

Server storage [IO: ▲0.27MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_am_upcoming_events
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for AM Events
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲10014.47 ▼0.091.59 ▼0.0541.13 ▼0.84
Dashboard /wp-admin2,249 ▲604.80 ▼0.18113.56 ▲2.3342.43 ▼1.46
Posts /wp-admin/edit.php2,144 ▲552.02 ▼0.0341.06 ▲4.2034.72 ▲1.39
Add New Post /wp-admin/post-new.php1,562 ▲4318.49 ▼4.79584.95 ▼90.6254.80 ▲3.99
Media Library /wp-admin/upload.php1,431 ▲404.19 ▼0.0595.74 ▼1.3140.41 ▼4.34
All Events /wp-admin/edit.php?post_type=am_event1,1751.9632.0629.71
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=am_event1,3472.1427.4528.95
AM Events /wp-admin/options-general.php?page=am-events-settings8462.0622.6225.72
Event Categories /wp-admin/edit-tags.php?taxonomy=am_event_categories&post_type=am_event1,3022.1426.9726.48
Venues /wp-admin/edit-tags.php?taxonomy=am_venues&post_type=am_event1,3022.1428.9528.53
Add New Event /wp-admin/post-new.php?post_type=am_event3,3597.65189.8185.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_am_upcoming_events
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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 items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/am-events/widget-upcoming-events.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/am-events/widget-upcoming-events.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please a description for screenshot #4 in am-events/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
You can take inspiration from this readme.txt

am-events/am-events.php Passed 13 tests

This is the main PHP file of "AM Events" version 1.13.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
85 characters long description:
Adds a post type for events and a customizable widget for displaying upcoming events.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin3,779 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PO File47819611,910
PHP44265641,736
JavaScript41512103
CSS261830

PHP code Passed 2 tests

This is a very shot review of 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.39
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity8.43
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods457.14%
▷ Protected methods342.86%
▷ Private methods00.00%
Functions63
▷ Named functions63100.00%
▷ Anonymous functions00.00%
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
There are no PNG files in this plugin