84% internet-quran-radio

Code Review | Internet Quran Radio

WordPress plugin Internet Quran Radio scored84%from 54 tests.

About plugin

  • Plugin page: internet-quran-radio
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 6.3.1
  • First release: Mar 27, 2015
  • Latest release: Jul 27, 2021
  • Number of updates: 11
  • Update frequency: every 210.4 days
  • Top authors: mp3quran (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /4,360 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.81ms] Passed 4 tests

An overview of server-side resources used by Internet Quran Radio
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1734.23 ▼3.29
Dashboard /wp-admin3.46 ▲0.1644.52 ▲0.35
Posts /wp-admin/edit.php3.52 ▲0.1647.19 ▲3.52
Add New Post /wp-admin/post-new.php6.05 ▲0.1687.41 ▼7.69
Media Library /wp-admin/upload.php3.39 ▲0.1634.56 ▼0.61

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 12 new options
New WordPress options
mp3quran_title
mp3quran_form
widget_theysaidso_widget
widget_mp3quran_radio_widget
widget_recent-posts
widget_recent-comments
mp3quran_viewtitle
can_compress_scripts
theysaidso_admin_options
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by Internet Quran Radio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲10613.32 ▼1.263.08 ▲1.3441.55 ▲3.15
Dashboard /wp-admin2,227 ▲385.79 ▲0.88100.76 ▼18.0277.91 ▲38.63
Posts /wp-admin/edit.php2,107 ▲182.00 ▲0.0438.43 ▲0.6333.54 ▲1.71
Add New Post /wp-admin/post-new.php1,539 ▲1123.12 ▲5.00670.28 ▲60.0160.32 ▼4.57
Media Library /wp-admin/upload.php1,409 ▲214.23 ▼0.14112.32 ▲16.1748.88 ▼0.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 12 options in the database
    • mp3quran_form
    • theysaidso_admin_options
    • mp3quran_viewtitle
    • db_upgraded
    • widget_mp3quran_radio_widget
    • mp3quran_height
    • mp3quran_autostart
    • widget_recent-comments
    • widget_recent-posts
    • mp3quran_title
    • ...

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/internet-quran-radio/list.php:167
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/internet-quran-radio/list.php:167

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: You can take inspiration from this readme.txt

internet-quran-radio/radio-admin.php 92% from 13 tests

The main PHP file in "Internet Quran Radio" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("internet-quran-radio.php" instead of "radio-admin.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
Everything looks great! No dangerous files found in this plugin785 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP36623490
JavaScript200291
CSS1104

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions13
▷ Named functions13100.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
4 PNG files occupy 0.16MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png43.20KB19.59KB▼ 54.66%
i/radio.png1.38KB0.81KB▼ 41.13%
screenshot-3.png52.10KB23.50KB▼ 54.90%
screenshot-2.png63.33KB27.67KB▼ 56.31%