67% station-pro

Code Review | Station Pro

WordPress plugin Station Pro scored67%from 54 tests.

About plugin

  • Plugin page: station-pro
  • Plugin version: 2.3.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2010
  • Latest release: Jul 6, 2023
  • Number of updates: 130
  • Update frequency: every 36.4 days
  • Top authors: marviorocha (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

40+ active /54,835 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲1.05MB] [CPU: ▲7.36ms] Passed 4 tests

An overview of server-side resources used by Station Pro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.52 ▲1.0558.59 ▲19.78
Dashboard /wp-admin4.42 ▲1.1158.38 ▲1.07
Posts /wp-admin/edit.php4.46 ▲1.1166.83 ▲13.27
Add New Post /wp-admin/post-new.php6.96 ▲1.0795.91 ▼4.69
Media Library /wp-admin/upload.php4.20 ▲0.9756.06 ▲25.60
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.5345.50

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 1,020 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
stationpro
fs_debug_mode
fs_accounts
stationpro-transients
theysaidso_admin_options
widget_recent-comments
db_upgraded
...

Browser metrics Passed 4 tests

Checking browser requirements for Station Pro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,754 ▲822.47 ▲8.10650.76 ▲648.5949.32 ▲7.93
Dashboard /wp-admin2,283 ▲1044.87 ▼0.94111.55 ▲4.8382.77 ▲38.99
Posts /wp-admin/edit.php2,127 ▲382.04 ▲0.0139.71 ▼2.2534.12 ▼2.50
Add New Post /wp-admin/post-new.php1,537 ▲1823.28 ▲0.13651.20 ▲57.3753.53 ▲4.09
Media Library /wp-admin/upload.php1,426 ▲444.15 ▼0.04104.92 ▲4.3852.52 ▲9.37
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0741.8526.1533.86

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/station-pro/app/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_recent-comments
    • widget_recent-posts
    • fs_debug_mode
    • widget_theysaidso_widget
    • fs_accounts
    • can_compress_scripts
    • db_upgraded
    • stationpro-transients
    • fs_active_plugins
    • stationpro
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/station-pro/core/inc/player/views/widget.php
    • > /wp-content/plugins/station-pro/core/inc/player/views/main.php
  • 49× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/station-pro/core/inc/fields/typography/field_typography.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/station-pro/core/inc/fields/editor/field_editor.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/station-pro/core/inc/fields/date/field_date.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Redux' not found in wp-content/plugins/station-pro/app/sections/fields/player_input.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/station-pro/core/inc/fields/dimensions/field_dimensions.php:9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/station-pro/app/templates/panel/container.tpl.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/station-pro/core/inc/fields/button_set/field_button_set.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/station-pro/core/templates/panel/header-stickybar.tpl.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/station-pro/core/inc/fields/spacing/field_spacing.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/station-pro/core/inc/fields/sorter/field_sorter.php:9

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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: audio player, radio, shoutcast, icecast, music...

station-pro/stationpro.php 85% from 13 tests

Analyzing the main PHP file in "Station Pro" version 2.3.4
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 161 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("station-pro.php" instead of "stationpro.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin118,857 lines of code in 701 files:
LanguageFilesBlank linesComment linesLines of code
PHP32315,19729,73460,975
JavaScript1478,24410,05632,922
Sass961,9298513,078
CSS1256,67733610,683
SVG710977
Markdown1680214
XML1007
JSON1001

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 110)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity51.45
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity5.23
▷ Minimum method complexity1.00
▷ Maximum method complexity110.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes193
▷ Abstract classes63.11%
▷ Concrete classes18796.89%
▷ Final classes00.00%
Methods2,333
▷ Static methods50221.52%
▷ Public methods1,71073.30%
▷ Protected methods1536.56%
▷ Private methods47020.15%
Functions122
▷ Named functions11695.08%
▷ Anonymous functions64.92%
Constants245
▷ Global constants10040.82%
▷ Class constants14559.18%
▷ Public constants145100.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
55 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/img/raw/jquery-ui-bootstrap/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%
core/assets/img/raw/jquery-ui-bootstrap/ui-icons_f6cf3b_256x240.png8.68KB4.11KB▼ 52.68%
core/assets/img/raw/2cl.png2.91KB0.24KB▼ 91.79%
core/assets/img/raw/jquery-ui-bootstrap/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
core/assets/img/raw/jquery-ui-bootstrap/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%