73% streamcast

Code Review | StreamCast - Radio Player for WordPress

WordPress plugin StreamCast - Radio Player for WordPress scored73%from 54 tests.

About plugin

  • Plugin page: streamcast
  • Plugin version: 2.1.10
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 12, 2020
  • Latest release: Oct 14, 2023
  • Number of updates: 64
  • Update frequency: every 20.5 days
  • Top authors: abuhayat (54.69%)shehabulislam (46.88%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /47,752 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.35MB] [CPU: ▲41.00ms] 75% from 4 tests

A check of server-side resources used by StreamCast - Radio Player for WordPress
Please take the time to fix the following items
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.35MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.89 ▲5.4386.39 ▲41.25
Dashboard /wp-admin8.91 ▲5.6193.52 ▲38.63
Posts /wp-admin/edit.php8.91 ▲5.5693.20 ▲42.90
Add New Post /wp-admin/post-new.php10.71 ▲4.82142.50 ▲41.22
Media Library /wp-admin/upload.php8.91 ▲5.6890.73 ▲51.90
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9168.80

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 357 new files
Database: no new tables, 9 new options
New WordPress options
fs_accounts
fs_debug_mode
db_upgraded
theysaidso_admin_options
fs_active_plugins
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for StreamCast - Radio Player for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲20013.74 ▼0.8818.57 ▲16.7431.62 ▼16.43
Dashboard /wp-admin2,227 ▲505.54 ▼0.1391.99 ▼0.7242.71 ▼5.74
Posts /wp-admin/edit.php2,133 ▲362.01 ▼0.0238.02 ▼0.8645.47 ▲8.53
Add New Post /wp-admin/post-new.php1,547 ▲1922.78 ▼0.60611.37 ▼53.2758.51 ▼2.98
Media Library /wp-admin/upload.php1,435 ▲384.09 ▼0.13100.96 ▼8.0742.66 ▼5.15
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1031.6724.5727.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/streamcast/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • fs_active_plugins
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • fs_debug_mode
    • theysaidso_admin_options
    • fs_accounts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/streamcast/mimes/enable-mime-type.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/streamcast/admin/codestar-framework/metabox-free.php:477
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/streamcast/admin/inc/metabox-free.php:468
    • > PHP Fatal error
      Uncaught Error: Call to undefined function str_fs() in wp-content/plugins/streamcast/admin/whats-new.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/streamcast/public/shortcode-free.php:212

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #2, #3, #4, #5 in streamcast/assets to your readme.txt
You can take inspiration from this readme.txt

streamcast/streamcast.php Passed 13 tests

This is the main PHP file of "StreamCast - Radio Player for WordPress" version 2.1.10, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
69 characters long description:
Play iceCast, Shoutcast, Radioco, Radionomy Live stream in Wordpress.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected68,798 lines of code in 279 files:
LanguageFilesBlank linesComment linesLines of code
PHP21011,54918,76948,834
PO File203,0373,4146,180
Sass1595234,811
JavaScript111,2904174,391
CSS202864834,366
Markdown1680214
SVG2002

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity55.62
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.99
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes108
▷ Abstract classes43.70%
▷ Concrete classes10496.30%
▷ Final classes00.00%
Methods1,507
▷ Static methods23815.79%
▷ Public methods1,11874.19%
▷ Protected methods171.13%
▷ Private methods37224.68%
Functions144
▷ Named functions144100.00%
▷ Anonymous functions00.00%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 0.24MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/rewind.png2.85KB1.58KB▼ 44.45%
public/images/on-air.png58.42KB29.72KB▼ 49.12%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
public/images/play.png3.07KB1.84KB▼ 39.94%
public/images/default.png4.15KB2.66KB▼ 35.89%