10% wp-radio

Code Review | WP Radio - Worldwide Online Radio Stations Directory for WordPress

WordPress plugin WP Radio - Worldwide Online Radio Stations Directory for WordPress scored 10% from 54 tests.

About plugin

  • Plugin page: wp-radio
  • Plugin version: 3.1.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 26, 2019
  • Latest release: May 27, 2022
  • Number of updates: 86
  • Update frequency: every 12.6 days
  • Top authors: princeahmed (100%)

Code review

54 tests

User reviews

68 reviews

Install metrics

1,000+ active / 49,491 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲4.86MB] [CPU: ▲34.59ms] Passed 4 tests

This is a short check of server-side resources used by WP Radio - Worldwide Online Radio Stations Directory for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.53 ▲5.0766.87 ▲26.95
Dashboard /wp-admin8.55 ▲5.2588.47 ▲44.23
Posts /wp-admin/edit.php8.55 ▲5.1976.13 ▲27.34
Add New Post /wp-admin/post-new.php9.82 ▲3.93129.55 ▲41.45
Media Library /wp-admin/upload.php8.55 ▲5.3276.83 ▲42.61
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.5573.53

Server storage [IO: ▲8.42MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 593 new files
Database: 2 new tables, 12 new options
New tables
wp_wp_radio_statistics
wp_wp_radio_visitors
New WordPress options
fs_debug_mode
widget_recent-posts
theysaidso_admin_options
db_upgraded
fs_gdpr
wp_radio_settings
fs_accounts
wp_radio_version
widget_recent-comments
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Radio - Worldwide Online Radio Stations Directory for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲96623.12 ▲8.8426.16 ▲24.2128.32 ▼23.39
Dashboard /wp-admin2,522 ▲36712.44 ▲6.75322.57 ▲227.22146.33 ▲103.46
Posts /wp-admin/edit.php2,237 ▲1489.51 ▲7.4984.86 ▲47.2982.14 ▲46.89
Add New Post /wp-admin/post-new.php6,629 ▲5,08723.62 ▲5.23778.91 ▲177.8338.46 ▼11.13
Media Library /wp-admin/upload.php1,585 ▲19711.59 ▲7.37133.51 ▲30.97129.95 ▲82.88
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,2009.0871.06101.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-radio/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_wp_radio_statistics
    • wp_wp_radio_visitors
  • The uninstall procedure has failed, leaving 12 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • fs_gdpr
    • wp_radio_version
    • fs_debug_mode
    • widget_theysaidso_widget
    • widget_recent-posts
    • wp_radio_settings
    • db_upgraded
    • fs_accounts
    • ...

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
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-radio/templates/listing/locations.php
    • > /wp-content/plugins/wp-radio/templates/statistics-email-report.php
  • 31× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-radio/includes/admin/views/notice/ads-player.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/wp-radio/includes/admin/views/recommended-plugins.php:55
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Csv\\Exception' not found in wp-content/plugins/wp-radio/vendor/league/csv/src/CannotInsertRecord.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Csv\\Exception' not found in wp-content/plugins/wp-radio/vendor/league/csv/src/InvalidArgument.php:21
    • > PHP Warning
      Use of undefined constant WP_RADIO_ASSETS - assumed 'WP_RADIO_ASSETS' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-radio/includes/admin/views/notice/ads-player.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_radio_get_playlist_items() in wp-content/plugins/wp-radio/templates/single/playlist.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_radio_get_location() in wp-content/plugins/wp-radio/templates/single/breadcrumbs.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Csv\\AbstractCsv' not found in wp-content/plugins/wp-radio/vendor/league/csv/src/Writer.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Csv\\Exception' not found in wp-content/plugins/wp-radio/vendor/league/csv/src/UnavailableStream.php:16
    • > PHP Warning
      Use of undefined constant WP_RADIO_ASSETS - assumed 'WP_RADIO_ASSETS' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-radio/includes/admin/views/notice/proxy-player-update.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #18, #19 in wp-radio/assets to your readme.txt
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

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

"WP Radio - Worldwide Online Radio Stations Directory for WordPress" version 3.1.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
56 characters long description:
Worldwide online radio stations directory for WordPress.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin59,092 lines of code in 491 files:
LanguageFilesBlank linesComment linesLines of code
PHP2019,13517,96339,531
SVG2620117,678
JavaScript103912611,666
JSON300181
CSS1542036

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity46.54
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces3
Interfaces3
Traits0
Classes95
▷ Abstract classes33.16%
▷ Concrete classes9296.84%
▷ Final classes55.43%
Methods1,540
▷ Static methods26016.88%
▷ Public methods1,15274.81%
▷ Protected methods553.57%
▷ Private methods33321.62%
Functions145
▷ Named functions13693.79%
▷ Anonymous functions96.21%
Constants156
▷ Global constants10667.95%
▷ Class constants5032.05%
▷ Public constants4692.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
58 PNG files occupy 1.92MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/track-thumb.png3.48KB1.85KB▼ 46.67%
freemius/assets/img/wp-radio-ads-player.png35.40KB15.38KB▼ 56.56%
assets/images/getting-started/sticky-player.png39.54KB42.19KB0.00%
assets/images/getting-started/country-list.png35.38KB37.52KB0.00%
assets/images/getting-started/region-list.png51.60KB55.82KB0.00%