10% fnffm-radio

Code Review | FnF.FM Radio

WordPress plugin FnF.FM Radio scored10%from 54 tests.

About plugin

  • Plugin page: fnffm-radio
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 6.3.1
  • First release: Aug 1, 2014
  • Latest release: Aug 21, 2016
  • Number of updates: 22
  • Update frequency: every 34.5 days
  • Top authors: cartoonistarif (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

60+ active /14,702 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/fnffm-radio/fnf.fm.php+65
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼57.36ms] Passed 4 tests

A check of server-side resources used by FnF.FM Radio
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.61 ▼34.89
Dashboard /wp-admin2.05 ▼1.306.05 ▼57.16
Posts /wp-admin/edit.php2.05 ▼1.315.65 ▼40.01
Add New Post /wp-admin/post-new.php2.05 ▼3.845.97 ▼97.38
Media Library /wp-admin/upload.php2.05 ▼1.185.65 ▼29.63

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_fnffmradiowidget

Browser metrics Passed 4 tests

FnF.FM Radio: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.21 ▼0.201.77 ▲0.1641.34 ▼1.97
Dashboard /wp-admin2,198 ▲215.63 ▲0.0385.31 ▼6.9237.53 ▼6.28
Posts /wp-admin/edit.php2,097 ▼62.03 ▲0.0534.51 ▼2.2630.54 ▼4.25
Add New Post /wp-admin/post-new.php1,531 ▲323.11 ▲0.17683.95 ▲31.0453.53 ▼6.87
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.04102.42 ▼3.0645.03 ▲1.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/fnffm-radio/fnf.fm.php+65
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_fnffmradiowidget

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/fnffm-radio/fnf.fm.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Adding Shortcode in Post/Page), #2 (Have a look at the player in Post/Page), #3 (In Widget), #4 (Have a look at the player in Sidebar)
The official readme.txt might help

fnffm-radio/fnf.fm.php 92% from 13 tests

The main file in "FnF.FM Radio" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("fnffm-radio.php" instead of "fnf.fm.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
Everything looks great! No dangerous files found in this plugin43 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111243

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions1
▷ Named functions1100.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.20MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png20.29KB7.69KB▼ 62.13%
screenshot-2.png154.14KB69.00KB▼ 55.23%
screenshot-4.png11.47KB5.35KB▼ 53.36%
screenshot-1.png17.74KB7.13KB▼ 59.78%