79% radiojar-player

Code Review | Radiojar Audio Player

WordPress plugin Radiojar Audio Player scored79%from 54 tests.

About plugin

  • Plugin page: radiojar-player
  • Plugin version: 1.4
  • PHP compatiblity: 5.6.33+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.4
  • WordPress version: 6.3.1
  • First release: Nov 13, 2017
  • Latest release: Jun 10, 2020
  • Number of updates: 64
  • Update frequency: every 14.7 days
  • Top authors: radiojar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,895 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
Install script ran successfully

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

Server-side resources used by Radiojar Audio Player
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0743.73 ▼27.60
Dashboard /wp-admin3.32 ▼0.0275.43 ▼32.54
Posts /wp-admin/edit.php3.37 ▲0.0279.08 ▼12.52
Add New Post /wp-admin/post-new.php5.90 ▲0.02141.57 ▼7.21
Media Library /wp-admin/upload.php3.24 ▲0.0160.22 ▼2.71

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_radiojar-player
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Radiojar Audio Player
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.40 ▲0.253.33 ▼0.0986.57 ▲11.15
Dashboard /wp-admin2,209 ▲274.93 ▼0.97188.43 ▼0.92126.09 ▲38.29
Posts /wp-admin/edit.php2,110 ▲181.94 ▼0.2267.17 ▼15.0371.74 ▼9.09
Add New Post /wp-admin/post-new.php1,417 ▲5617.85 ▼0.011,016.21 ▲56.8186.64 ▲5.97
Media Library /wp-admin/upload.php1,394 ▲124.20 ▲0.04180.64 ▼11.38124.06 ▲33.03

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_radiojar-player
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/radiojar-player/radiojar-player.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/radiojar-player/inc/widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/radiojar-player/inc/admin-settings.php:235
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/radiojar-player/player3.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_script_is() in wp-content/plugins/radiojar-player/player2.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_script_is() in wp-content/plugins/radiojar-player/player1.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_script_is() in wp-content/plugins/radiojar-player/chat.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: radiojar, widget, mp3 player, audio player, music player

radiojar-player/radiojar-player.php Passed 13 tests

Analyzing the main PHP file in "Radiojar Audio Player" version 1.4
71 characters long description:
Radiojar player plugin for WordPress. Insert with shortcode [rj-player]

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
There were no executable files found in this plugin781 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP99936579
JavaScript33839136
CSS25066

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
5 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
radiojar-white.png3.08KB0.72KB▼ 76.59%
images/player1.png4.79KB1.35KB▼ 71.83%
images/player2.png5.79KB1.93KB▼ 66.70%
images/poweredby.png12.97KB7.32KB▼ 43.54%
images/player3.png29.13KB11.23KB▼ 61.45%