84% now-playing-widget-fuer-azuracast-stationen

Code Review | Now playing for AzuraCast

WordPress plugin Now playing for AzuraCast scored 84% from 54 tests.

About plugin

  • Plugin page: now-playing-widge...
  • Plugin version: 2.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-5.7
  • WordPress version: 5.8.1
  • First release: Jun 28, 2019
  • Latest release: Mar 18, 2021
  • Number of updates: 54
  • Update frequency: every 11.7 days
  • Top authors: sirjavik (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 2,564 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.17MB] [CPU: ▼145.20ms] Passed 4 tests

Server-side resources used by Now playing for AzuraCast
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.00 ▲0.2837.12 ▲11.43
Dashboard /wp-admin3.21 ▲0.1647.29 ▼2.44
Posts /wp-admin/edit.php3.32 ▲0.2238.28 ▼12.94
Add New Post /wp-admin/post-new.php5.57 ▲0.1495.39 ▼567.98
Media Library /wp-admin/upload.php3.16 ▲0.1535.63 ▲2.58

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 1 new option
New WordPress options
widget_azuracast_nowplaying

Browser metrics Passed 4 tests

An overview of browser requirements for Now playing for AzuraCast
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,840 ▲24416.33 ▲0.7813.12 ▲2.7748.03 ▼7.93
Dashboard /wp-admin2,967 ▲335.85 ▼0.09145.94 ▼6.69120.49 ▲1.68
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0071.17 ▼2.0997.86 ▼8.46
Add New Post /wp-admin/post-new.php1,604 ▼7918.75 ▲0.04372.82 ▼12.68113.17 ▼2.73
Media Library /wp-admin/upload.php1,810 ▲35.03 ▲0.03149.76 ▼18.31134.07 ▲6.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_azuracast_nowplaying

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/now-playing-widget-fuer-azuracast-stationen/src/Azuracast_Widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/now-playing-widget-fuer-azuracast-stationen/azuracast-plugin.php:121

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% 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: You can look at the official readme.txt

now-playing-widget-fuer-azuracast-stationen/azuracast-plugin.php 92% from 13 tests

Analyzing the main PHP file in "Now playing for AzuraCast" version 2.0.4
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("now-playing-widget-fuer-azuracast-stationen.php" instead of "azuracast-plugin.php")

Code Analysis Passed 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
Good job! No executable or dangerous file extensions detected1,748 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2118115892
PHP9140225633
PO File24040114
CSS313079
JSON20021
HTML1109

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.80
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes240.00%
Methods36
▷ Static methods1130.56%
▷ Public methods3597.22%
▷ Protected methods00.00%
▷ Private methods12.78%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin