10% ody-events

Code Review | Ody Events

WordPress plugin Ody Events scored10%from 54 tests.

About plugin

  • Plugin page: ody-events
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Aug 9, 2012
  • Latest release: Sep 4, 2012
  • Number of updates: 23
  • Update frequency: every 4.7 days
  • Top authors: korinthorama (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,396 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/ody-events/events_widget.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; odyCalendar has a deprecated constructor

Server metrics [RAM: ▼1.80MB] [CPU: ▼56.95ms] Passed 4 tests

Analyzing server-side resources used by Ody Events
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.265.52 ▼44.86
Dashboard /wp-admin2.23 ▼1.127.83 ▼46.93
Posts /wp-admin/edit.php2.23 ▼1.137.48 ▼42.69
Add New Post /wp-admin/post-new.php2.23 ▼3.678.63 ▼93.30
Media Library /wp-admin/upload.php2.23 ▼1.016.55 ▼30.74

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 37 new files
Database: 1 new table, 15 new options
New tables
wp_ody_events
New WordPress options
eventsBackground
widget_ody_calendar
headerBackground
db_upgraded
ody_events_msg
can_compress_scripts
buttonBackground
ody_events_delete_on_uninstall
eventsListBackground
ody_post_types
...

Browser metrics Passed 4 tests

An overview of browser requirements for Ody Events
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8013.17 ▼1.073.49 ▲1.6846.50 ▲3.53
Dashboard /wp-admin2,222 ▲515.81 ▲0.3093.49 ▲8.7179.53 ▲38.19
Posts /wp-admin/edit.php2,142 ▲422.21 ▲0.2342.27 ▲3.1937.13 ▲0.90
Add New Post /wp-admin/post-new.php6,251 ▲4,71626.03 ▲8.07910.27 ▲228.12153.28 ▲84.49
Media Library /wp-admin/upload.php1,433 ▲334.34 ▲0.10107.44 ▲8.6979.99 ▲32.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/ody-events/events_widget.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; odyCalendar has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ody-events/remove_event_dates.php
    • > /wp-content/plugins/ody-events/getmonth.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ody-events/ody_events.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_shortlink() in wp-content/plugins/ody-events/events_form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/ody-events/ody_events.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ody-events/events_widget.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ody-events/admin_icons.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === ody-events === )
You can take inspiration from this readme.txt

ody-events/ody_events.php 92% from 13 tests

"Ody Events" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("ody-events.php" instead of "ody_events.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,523 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP86723831
CSS23242375
PO File1101130219
JavaScript1281298

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.50
▷ Minimum class complexity3.00
▷ Maximum class complexity6.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
19 PNG files occupy 0.12MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/ui-overcast/images/ui-bg_flat_55_eeeeee_40x100.png0.18KB0.08KB▼ 51.67%
css/ui-overcast/images/ui-icons_fbc856_256x240.png4.27KB4.11KB▼ 3.78%
css/ui-overcast/images/ui-bg_glass_100_f8f8f8_1x400.png0.10KB0.11KB0.00%
images/icon.png0.76KB0.79KB0.00%
css/ui-overcast/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%