66% radio-station

Code Review | Radio Station by netmix® - Manage and play your Show Schedule in WordPress!

WordPress plugin Radio Station by netmix® - Manage and play your Show Schedule in WordPress! scored66%from 54 tests.

About plugin

  • Plugin page: radio-station
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2013
  • Latest release: Nov 23, 2023
  • Number of updates: 250
  • Update frequency: every 15.7 days
  • Top authors: tonyzeoli (77.6%)kionae (22.8%)

Code review

54 tests

User reviews

27 reviews

Install metrics

1,000+ active /125,501 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲9.37MB] [CPU: ▲54.06ms] 50% from 4 tests

This is a short check of server-side resources used by Radio Station by netmix® - Manage and play your Show Schedule in WordPress!
Please take the time to fix the following items
  • RAM: Total memory usage must be kept under 10MB (currently 13.51MB on /wp-admin/admin.php?page=freemius)
  • Extra RAM: The extra memory usage must be under 5MB (currently 9.37MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /12.35 ▲8.88106.06 ▲68.82
Dashboard /wp-admin13.51 ▲10.20120.01 ▲72.96
Posts /wp-admin/edit.php13.51 ▲10.16103.02 ▲50.89
Add New Post /wp-admin/post-new.php14.12 ▲8.23126.16 ▲24.56
Media Library /wp-admin/upload.php13.51 ▲10.28104.77 ▲71.96
Radio Station /wp-admin/options-general.php?page=radio-station13.5186.99
Freemius Debug [v.2.5.11] /wp-admin/admin.php?page=freemius13.5189.69

Server storage [IO: ▲9.53MB] [DB: ▲0.08MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/radio-station/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/radio-station/assets/banner-772\303\227250.jpg"
Filesystem: 410 new files
Database: no new tables, 18 new options
New WordPress options
fs_debug_mode
radio_station_first_install
theysaidso_admin_options
widget_dj_upcoming_widget
radio_station
radio_station_version
widget_radio_player_widget
widget_dj_widget
widget_theysaidso_widget
widget_recent-comments
...

Browser metrics Passed 4 tests

Checking browser requirements for Radio Station by netmix® - Manage and play your Show Schedule in WordPress!
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,043 ▲28114.25 ▼0.019.42 ▲7.5829.62 ▼8.94
Dashboard /wp-admin2,322 ▲1445.75 ▲0.0896.02 ▼14.74101.11 ▲56.77
Posts /wp-admin/edit.php2,268 ▲1652.32 ▲0.3739.53 ▼0.0643.85 ▲4.55
Add New Post /wp-admin/post-new.php1,639 ▲11319.96 ▼3.22789.37 ▲172.9340.06 ▼5.26
Media Library /wp-admin/upload.php1,518 ▲1244.30 ▼0.0698.78 ▲3.4272.47 ▲27.30
Radio Station /wp-admin/options-general.php?page=radio-station1,0281.8130.2663.43
Freemius Debug [v.2.5.11] /wp-admin/admin.php?page=freemius1,1061.6625.5629.51

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/radio-station/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 18 options in the database
    • widget_dj_upcoming_widget
    • widget_playlist_widget
    • theysaidso_admin_options
    • widget_radio_clock_widget
    • fs_accounts
    • db_upgraded
    • radio_station_schedule_updated
    • radio_station_version
    • widget_dj_widget
    • can_compress_scripts
    • ...

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/radio-station/help/show-schedule.php
    • > /wp-content/plugins/radio-station/help/import.php
    • > /wp-content/plugins/radio-station/help/yaml.php
    • > /wp-content/plugins/radio-station/help/export.php
    • > /wp-content/plugins/radio-station/help/edit-show.php
  • 44× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/radio-station/templates/playlist-export.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/radio-station/widgets/class-current-playlist-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/radio-station/includes/post-types-admin.php:92
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/radio-station/includes/user-roles.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/radio-station/options.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function radio_station_get_hours() in wp-content/plugins/radio-station/templates/master-schedule-tabs.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/radio-station/templates/legacy/archive-playlist.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function radio_station_get_setting() in wp-content/plugins/radio-station/templates/single-show-content.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/radio-station/widgets/class-radio-player-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' not found in wp-content/plugins/radio-station/vendor/symfony/yaml/Exception/ParseException.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: shows, music, playlist, broadcasting, dj...

radio-station/loader.php 85% from 13 tests

The primary PHP file in "Radio Station by netmix® - Manage and play your Show Schedule in WordPress!" version 1.3.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Git Repository: A Git repository was detected inside this plugin
  • Main file name: Name the main plugin file the same as the plugin slug ("radio-station.php" instead of "loader.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin97,978 lines of code in 288 files:
LanguageFilesBlank linesComment linesLines of code
PHP18614,59030,02565,737
JavaScript313,9188,87220,149
PO File92,4542,9975,186
Markdown231,20013,158
CSS233571552,520
SVG202627
XML7229304
JSON500246
YAML23951

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,087)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 134)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity88.83
▷ Minimum class complexity1.00
▷ Maximum class complexity3,087.00
Average method complexity5.18
▷ Minimum method complexity1.00
▷ Maximum method complexity134.00
Code structure
Namespaces6
Interfaces1
Traits0
Classes74
▷ Abstract classes22.70%
▷ Concrete classes7297.30%
▷ Final classes22.78%
Methods1,607
▷ Static methods23814.81%
▷ Public methods1,16272.31%
▷ Protected methods281.74%
▷ Private methods41725.95%
Functions616
▷ Named functions61099.03%
▷ Anonymous functions60.97%
Constants201
▷ Global constants13667.66%
▷ Class constants6532.34%
▷ Public constants65100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
54 PNG files occupy 1.84MB with 1.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-5.png157.62KB73.15KB▼ 53.59%
css/images/ui-icons_222222_256x240.png6.86KB4.18KB▼ 39.05%
player/images/play-dark-square.png2.61KB0.41KB▼ 84.37%
player/images/volume-controls-dark.png6.83KB1.87KB▼ 72.55%
css/images/ui-bg_glass_75_e6e6e6_1x400.png0.32KB0.15KB▼ 53.40%