68% serverless-radio

Code Review | Serverless Radio

WordPress plugin Serverless Radio scored68%from 54 tests.

About plugin

  • Plugin page: serverless-radio
  • Plugin version: 0.7.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6.1
  • WordPress version: 6.3.1
  • First release: Dec 17, 2020
  • Latest release: May 10, 2021
  • Number of updates: 23
  • Update frequency: every 6.3 days
  • Top authors: svnlabs (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /2,813 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.97MB] [CPU: ▼58.81ms] Passed 4 tests

This is a short check of server-side resources used by Serverless Radio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.28 ▼37.63
Dashboard /wp-admin2.05 ▼1.305.55 ▼58.93
Posts /wp-admin/edit.php2.05 ▼1.316.71 ▼45.24
Add New Post /wp-admin/post-new.php2.05 ▼3.845.75 ▼93.43
Media Library /wp-admin/upload.php2.05 ▼1.187.06 ▼31.03

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Serverless Radio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.35 ▼0.001.71 ▼0.0638.40 ▼5.91
Dashboard /wp-admin2,207 ▲275.58 ▼0.0989.38 ▼8.2339.30 ▼3.68
Posts /wp-admin/edit.php2,115 ▲121.97 ▼0.0638.45 ▼2.1332.84 ▼2.07
Add New Post /wp-admin/post-new.php1,539 ▲1323.44 ▼0.15680.31 ▼28.7963.97 ▲8.37
Media Library /wp-admin/upload.php1,409 ▲64.17 ▼0.0398.29 ▼10.8146.03 ▲1.52
Serverless Radio /wp-admin/serverless-radio.php260.420.0816.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the slr_plugin_script4 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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 | 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
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/serverless-radio/player/player.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function slr_get_current_song() in wp-content/plugins/serverless-radio/player/events.php:28
    • > PHP Notice
      Undefined variable: slrtick in wp-content/plugins/serverless-radio/player/events.php on line 59
    • > PHP Notice
      Undefined variable: startedAt in wp-content/plugins/serverless-radio/player/events.php on line 59

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/serverless-radio.php
    • > Network (severe)
    wp-admin/serverless-radio.php - 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 important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Serverless Radio Stream Player), #2 (Serverless Radio Stream Playlist Scan), #3 (Serverless Radio MP3 Stream Player Settings and Drag Drop Customize Playlist), #4 (Serverless Radio Stream Player and Embed Code)
You can take inspiration from this readme.txt

serverless-radio/serverless-radio.php Passed 13 tests

"Serverless Radio" version 0.7.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
115 characters long description:
Serverless Radio, MP3 Linear Playback, Radio Player, MP3 podcast Player, Audio Player, HTML5, Radiosolution, AutoDJ

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin859 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript322680384
PHP434858378
CSS213896
HTML1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
player/images/dd.png1.39KB0.96KB▼ 31.13%
player/images/bn-arrows.png1.25KB0.36KB▼ 71.05%
player/images/b_pause.png0.27KB0.27KB▼ 0.73%
player/images/b_play.png0.34KB0.33KB▼ 3.12%