10% riotschedule

Code Review | RiotSchedule

WordPress plugin RiotSchedule scored10%from 54 tests.

About plugin

  • Plugin page: riotschedule
  • Plugin version: 1.1b2...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Feb 10, 2013
  • Latest release: Dec 28, 2013
  • Number of updates: 9
  • Update frequency: every 157.9 days
  • Top authors: mattyribbo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,917 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/riotschedule/riotschedule.php+2478
    Uncaught Error: Call to undefined function mysql_get_server_info() in wp-content/plugins/riotschedule/riotschedule.php:2478
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): rs_install()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.18ms] Passed 4 tests

This is a short check of server-side resources used by RiotSchedule
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.84 ▼3.54
Dashboard /wp-admin3.31 ▼0.0448.81 ▼23.54
Posts /wp-admin/edit.php3.36 ▲0.0044.70 ▼0.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.80 ▼9.15
Media Library /wp-admin/upload.php3.23 ▲0.0046.38 ▲11.81

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

RiotSchedule: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.36 ▼0.022.27 ▲0.5342.00 ▼1.96
Dashboard /wp-admin2,195 ▲185.67 ▲0.1183.09 ▼24.8341.11 ▼12.63
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0236.26 ▼0.9732.75 ▼0.86
Add New Post /wp-admin/post-new.php1,545 ▲1323.30 ▲0.02671.04 ▼10.5156.29 ▲0.50
Media Library /wp-admin/upload.php1,403 ▲34.24 ▼0.03108.76 ▼9.7446.27 ▼8.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/riotschedule/riotschedule.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("http;//www.mattyribbo.co.uk/projects/riotschedule")
You can take inspiration from this readme.txt

riotschedule/riotschedule.php 92% from 13 tests

The principal PHP file in "RiotSchedule" v. 1.1b2... is loaded by WordPress automatically on each request
It is important to fix the following:
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "1.1b2...")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected2,166 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP14131432,029
CSS220136
JavaScript10121

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 144)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity85.00
▷ Minimum class complexity23.00
▷ Maximum class complexity147.00
Average method complexity25.00
▷ Minimum method complexity1.00
▷ Maximum method complexity144.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/calendar.png0.66KB0.73KB0.00%
icons/delete.png0.70KB0.72KB0.00%