84% events-listing-widget

Code Review | Events Listing Widget

WordPress plugin Events Listing Widget scored84%from 54 tests.

About plugin

  • Plugin page: events-listing-wi...
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.0
  • WordPress version: 6.3.1
  • First release: Feb 7, 2012
  • Latest release: Jun 26, 2022
  • Number of updates: 54
  • Update frequency: every 70.2 days
  • Top authors: jackdewey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /13,748 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
Installer ran successfully

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

An overview of server-side resources used by Events Listing Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.06 ▲5.96
Dashboard /wp-admin3.45 ▲0.1550.48 ▲0.34
Posts /wp-admin/edit.php3.56 ▲0.2147.81 ▼2.91
Add New Post /wp-admin/post-new.php6.05 ▲0.1781.78 ▼14.67
Media Library /wp-admin/upload.php3.37 ▲0.1541.92 ▲6.98
Add New Event /wp-admin/post-new.php?post_type=events_listing3.4949.65
Events Listing Widget /wp-admin/options-general.php?page=events-listing-config3.3536.89
Events Listing /wp-admin/edit.php?post_type=events_listing3.4238.36

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: 23 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_recent-posts
events_listing_Options
can_compress_scripts
db_upgraded
widget_events_listing_widget
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Events Listing Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10613.21 ▼1.161.67 ▼0.0244.52 ▲2.06
Dashboard /wp-admin2,232 ▲445.91 ▲1.0199.09 ▼12.6978.96 ▲37.84
Posts /wp-admin/edit.php2,127 ▲382.06 ▲0.0237.42 ▼4.2734.67 ▼4.05
Add New Post /wp-admin/post-new.php1,702 ▲18322.43 ▼0.92766.30 ▲117.9758.35 ▲8.31
Media Library /wp-admin/upload.php1,429 ▲414.27 ▲0.08111.94 ▲9.3648.45 ▲1.60
Add New Event /wp-admin/post-new.php?post_type=events_listing2,3277.83182.63154.69
Events Listing Widget /wp-admin/options-general.php?page=events-listing-config1,0652.2835.5925.67
Events Listing /wp-admin/edit.php?post_type=events_listing1,1032.0133.7631.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_events_listing_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • events_listing_Options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/events-listing-widget/events-listing-widget.php:15

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: events, sidebar, widget, upcoming

events-listing-widget/events-listing-widget.php Passed 13 tests

The main file in "Events Listing Widget" v. 1.3.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
85 characters long description:
Creates a new post type to manage events and a widget to display them chronologically

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
No dangerous file extensions were detected2,495 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1952231,520
PHP113156619
CSS12558279
PO File1292977

PHP code Passed 2 tests

A short 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.29
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity9.40
▷ Minimum method complexity1.00
▷ Maximum method complexity24.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%
Functions23
▷ Named functions23100.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
16 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_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png0.25KB0.15KB▼ 37.45%
css/ui-lightness/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png0.10KB0.11KB0.00%
css/ui-lightness/images/ui-icons_ef8c08_256x240.png4.27KB4.11KB▼ 3.78%