83% european-school-radio-widget

Code Review | European School Radio Widget

WordPress plugin European School Radio Widget scored83%from 54 tests.

About plugin

  • Plugin page: european-school-r...
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9
  • WordPress version: 6.3.1
  • First release: May 8, 2021
  • Latest release: Jan 26, 2022
  • Number of updates: 16
  • Update frequency: every 16.4 days
  • Top authors: europeanschoolradio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /620 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.65ms] Passed 4 tests

Analyzing server-side resources used by European School Radio Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.20 ▼3.48
Dashboard /wp-admin3.32 ▲0.0154.47 ▼1.13
Posts /wp-admin/edit.php3.37 ▲0.0144.98 ▼5.68
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.90 ▼4.31
Media Library /wp-admin/upload.php3.24 ▲0.0136.88 ▲1.27

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_ersradio-widget
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

European School Radio Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲514.27 ▼0.081.93 ▼0.2842.71 ▼4.63
Dashboard /wp-admin2,189 ▲175.52 ▼0.0985.72 ▼19.5939.34 ▼7.08
Posts /wp-admin/edit.php2,097 ▼01.94 ▼0.0135.60 ▲0.0831.45 ▼7.00
Add New Post /wp-admin/post-new.php1,528 ▲223.46 ▲0.55672.88 ▲26.9856.95 ▲7.55
Media Library /wp-admin/upload.php1,400 ▲34.19 ▲0.02105.26 ▲3.9047.73 ▲3.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_ersradio-widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 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/european-school-radio-widget/ersradio-widget.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === european-school-radio-widget === )
  • License uri: Invalid URI found ("")
You can look at the official readme.txt

european-school-radio-widget/ersradio-widget.php 92% from 13 tests

"European School Radio Widget" version 2.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("european-school-radio-widget.php" instead of "ersradio-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected311 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP42638134
PO File23824120
CSS18057

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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%
Functions2
▷ Named functions2100.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
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ESR_Flag.png5.55KB3.04KB▼ 45.22%
images/ESR_FullLogo.png47.98KB21.79KB▼ 54.59%
images/ESR_FlagWithPlay.png6.65KB3.64KB▼ 45.23%