84% te-icecast-station-info

Code Review | TE Icecast 2 Station Information

WordPress plugin TE Icecast 2 Station Information scored84%from 54 tests.

About plugin

  • Plugin page: te-icecast-statio...
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2.4
  • WordPress version: 6.3.1
  • First release: Apr 8, 2019
  • Latest release: Jan 25, 2020
  • Number of updates: 17
  • Update frequency: every 17.2 days
  • Top authors: xdjxdaveyx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,112 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.14ms] Passed 4 tests

An overview of server-side resources used by TE Icecast 2 Station Information
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.28 ▼2.02
Dashboard /wp-admin3.38 ▲0.0345.37 ▼20.40
Posts /wp-admin/edit.php3.43 ▲0.0749.14 ▲1.13
Add New Post /wp-admin/post-new.php5.96 ▲0.0794.54 ▲2.19
Media Library /wp-admin/upload.php3.30 ▲0.0735.20 ▲0.75

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_te_isi_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for TE Icecast 2 Station Information
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.20 ▼1.171.64 ▼0.1242.86 ▲1.10
Dashboard /wp-admin2,206 ▲204.83 ▼1.10106.85 ▲2.7837.46 ▼6.29
Posts /wp-admin/edit.php2,089 ▼31.96 ▼0.0739.33 ▲3.9634.87 ▲0.59
Add New Post /wp-admin/post-new.php1,519 ▼022.46 ▼0.97587.60 ▼112.3947.99 ▼9.30
Media Library /wp-admin/upload.php1,391 ▲94.24 ▲0.0593.42 ▼4.5039.49 ▼7.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_te_isi_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% 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 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/te-icecast-station-info/te-icecast-station-info.php:158

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: displays icecast 2 now playing tracks

te-icecast-station-info/te-icecast-station-info.php Passed 13 tests

The main PHP script in "TE Icecast 2 Station Information" version 1.0.5 is automatically included on every request by WordPress
36 characters long description:
Displays Icecast2 now playing tracks

Code Analysis Passed 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 plugin412 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13643329
CSS12083

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity12.00
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin