84% codescar-radio-widget

Code Review | Codescar Radio Widget

WordPress plugin Codescar Radio Widget scored 84% from 54 tests.

About plugin

  • Plugin page: codescar-radio-wi...
  • Plugin version: 0.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 5.8.1
  • First release: Jul 10, 2014
  • Latest release: Mar 30, 2015
  • Number of updates: 15
  • Update frequency: every 17.6 days
  • Top authors: Sudavar (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 8,758 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by Codescar Radio Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1840.85 ▲16.93
Dashboard /wp-admin3.12 ▲0.0748.48 ▼7.18
Posts /wp-admin/edit.php3.17 ▲0.0756.29 ▲5.96
Add New Post /wp-admin/post-new.php5.49 ▲0.06106.13 ▼561.84
Media Library /wp-admin/upload.php3.07 ▲0.0638.34 ▼12.71
Codescar Radio Widget Options /wp-admin/options-general.php?page=codescar-radio-widget3.0332.13

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 2 new options
New WordPress options
cdscr_radio_settings
widget_codescar_radio_widget

Browser metrics Passed 4 tests

Checking browser requirements for Codescar Radio Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,825 ▲25416.77 ▲1.5214.42 ▲4.7046.18 ▼8.37
Dashboard /wp-admin2,979 ▲426.00 ▲0.06161.64 ▼20.68117.95 ▲0.27
Posts /wp-admin/edit.php2,748 ▲92.73 ▲0.0171.21 ▼0.0498.44 ▲4.92
Add New Post /wp-admin/post-new.php1,587 ▲620.56 ▲2.87456.45 ▼7.98118.44 ▼26.75
Media Library /wp-admin/upload.php1,816 ▲125.06 ▲0.04173.88 ▼20.88120.92 ▼23.79
Codescar Radio Widget Options /wp-admin/options-general.php?page=codescar-radio-widget1,3472.2360.3072.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_codescar_radio_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/codescar-radio-widget/radio-widget.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: radio, radio stations, radio widget, audio element html5, codescar...

codescar-radio-widget/radio-widget.php 92% from 13 tests

The principal PHP file in "Codescar Radio Widget" v. 0.4.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("codescar-radio-widget.php" instead of "radio-widget.php")

Code Analysis Passed 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
No dangerous file extensions were detected435 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP21745270
CSS1101131
JavaScript14434

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity17.50
▷ Minimum class complexity12.00
▷ Maximum class complexity23.00
Average method complexity5.71
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/pause.png2.61KB1.61KB▼ 38.44%
img/volume.png2.72KB1.63KB▼ 40.17%
img/mute.png3.62KB1.81KB▼ 49.81%
img/play.png2.66KB1.64KB▼ 38.47%