10% community-events

Code Review | Community Events

WordPress plugin Community Events scored10%from 54 tests.

About plugin

  • Plugin page: community-events
  • Plugin version: 1.4.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Jul 15, 2010
  • Latest release: Nov 9, 2022
  • Number of updates: 80
  • Update frequency: every 56.4 days
  • Top authors: jackdewey (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /15,002 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/community-events/community-events.php+40
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.68MB] [CPU: ▲1.25ms] Passed 4 tests

An overview of server-side resources used by Community Events
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6749.61 ▲7.12
Dashboard /wp-admin3.99 ▲0.6954.25 ▲0.39
Posts /wp-admin/edit.php4.11 ▲0.7557.71 ▲5.82
Add New Post /wp-admin/post-new.php6.57 ▲0.68100.04 ▼1.72
Media Library /wp-admin/upload.php3.92 ▲0.6839.07 ▲0.49
Events /wp-admin/admin.php?page=community-events-events3.9137.39
Stylesheet /wp-admin/admin.php?page=community-events-stylesheet3.9033.31
Community Events /wp-admin/admin.php?page=community-events3.9037.91
Venues /wp-admin/admin.php?page=community-events-venues3.9140.05
Event Types /wp-admin/admin.php?page=community-events-event-types3.9135.61

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 57 new files
Database: 3 new tables, 7 new options
New tables
wp_ce_category
wp_ce_events
wp_ce_venues
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
CE_PP
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Community Events: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲19213.57 ▼0.7810.66 ▲8.8544.00 ▼2.08
Dashboard /wp-admin2,218 ▲385.76 ▲0.1490.00 ▼10.5776.43 ▲34.09
Posts /wp-admin/edit.php2,141 ▲382.01 ▼0.0337.50 ▲2.7834.36 ▲0.97
Add New Post /wp-admin/post-new.php1,573 ▲4723.00 ▼0.12764.46 ▲106.6953.62 ▼15.41
Media Library /wp-admin/upload.php1,441 ▲414.14 ▼0.02105.83 ▼2.5171.63 ▲26.25
Events /wp-admin/admin.php?page=community-events-events1,3572.5342.7041.72
Stylesheet /wp-admin/admin.php?page=community-events-stylesheet9782.2137.3934.73
Community Events /wp-admin/admin.php?page=community-events1,6222.3438.1933.68
Venues /wp-admin/admin.php?page=community-events-venues1,2192.3039.9032.61
Event Types /wp-admin/admin.php?page=community-events-event-types1,0632.1135.3127.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 3 tables
    • wp_ce_venues
    • wp_ce_events
    • wp_ce_category
  • Zombie WordPress options were found after uninstall: 7 options
    • CE_PP
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/community-events/captcha/easycaptcha.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/community-events/community-events.php:26

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=community-events-event-types
    • > Network (severe)
    wp-admin/images/gray-grad.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (7-day Outlook Event Calendar), #2 (Full Listing Event Calendar), #3 (User event submission form)
You can look at the official readme.txt

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

"Community Events" version 1.4.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
59 characters long description:
A plugin used to manage events and display them in a widget

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin4,798 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP51,0292813,472
PO File2402525866
CSS310360437
XML11922
JavaScript10201

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 124)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity250.33
▷ Minimum class complexity41.00
▷ Maximum class complexity637.00
Average method complexity11.11
▷ Minimum method complexity1.00
▷ Maximum method complexity124.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods74
▷ Static methods00.00%
▷ Public methods74100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png0.17KB0.08KB▼ 51.12%
icons/delete.png0.70KB0.72KB0.00%
icons/calendar.png0.47KB0.57KB0.00%
icons/resultset_first.png0.51KB0.52KB0.00%
icons/resultset_previous.png0.38KB0.34KB▼ 9.25%