78% gravy-events-widgets

Code Review | Gravy Events Widgets

WordPress plugin Gravy Events Widgets scored78%from 54 tests.

About plugin

  • Plugin page: gravy-events-widgets
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Dec 31, 2013
  • Latest release: Dec 31, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: findgravy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,210 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.30ms] Passed 4 tests

An overview of server-side resources used by Gravy Events Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.0848.24 ▲3.32
Dashboard /wp-admin3.70 ▲0.1454.05 ▼8.72
Posts /wp-admin/edit.php3.75 ▲0.0753.98 ▲3.64
Add New Post /wp-admin/post-new.php6.24 ▲0.0988.81 ▼16.52
Media Library /wp-admin/upload.php3.56 ▲0.0739.49 ▲0.73

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_gravy-events-mood
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_gravy-events-channel
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Gravy Events Widgets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲14013.81 ▼0.578.21 ▲6.3342.15 ▲2.48
Dashboard /wp-admin2,193 ▲135.54 ▼0.2696.22 ▲0.0442.61 ▼3.83
Posts /wp-admin/edit.php2,104 ▲72.00 ▼0.0435.59 ▼0.7233.61 ▼5.43
Add New Post /wp-admin/post-new.php1,530 ▼123.33 ▼0.03673.87 ▼3.3360.45 ▲7.36
Media Library /wp-admin/upload.php1,401 ▲14.19 ▼0.08107.04 ▲3.0043.35 ▲0.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_gravy-events-mood
    • widget_gravy-events-channel
    • db_upgraded

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gravy-events-widgets/views/widget-mood.php
    • > /wp-content/plugins/gravy-events-widgets/views/widget-channel.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/gravy-events-widgets/views/admin-channel.php:8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/gravy-events-widgets/views/widget-mood.php on line 7
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/gravy-events-widgets/views/widget-mood.php on line 4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/gravy-events-widgets/views/widget-channel.php on line 7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/gravy-events-widgets/views/admin-mood.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/gravy-events-widgets/gravy-events-widget.php:32
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/gravy-events-widgets/views/widget-channel.php on line 4
    • > PHP Notice
      Undefined variable: events in wp-content/plugins/gravy-events-widgets/views/widget-mood.php on line 7
    • > PHP Notice
      Undefined variable: events in wp-content/plugins/gravy-events-widgets/views/widget-channel.php on line 7

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: local, experiences, location, events, widget...

gravy-events-widgets/gravy-events-widget.php 85% from 13 tests

The entry point to "Gravy Events Widgets" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gravy-events-widgets.php" instead of "gravy-events-widget.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin471 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP471155315
CSS2101135
PO File10017
JavaScript2284

PHP code Passed 2 tests

An overview 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.31
Average class complexity11.00
▷ Minimum class complexity9.00
▷ Maximum class complexity13.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin