83% quran-radio

Code Review | Quran Radio

WordPress plugin Quran Radio scored83%from 54 tests.

About plugin

  • Plugin page: quran-radio
  • Plugin version: 4.16
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2013
  • Latest release: Nov 21, 2023
  • Number of updates: 259
  • Update frequency: every 14.2 days
  • Top authors: edckwt (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

100+ active /21,316 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Quran Radio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.23 ▼7.48
Dashboard /wp-admin3.32 ▲0.0246.08 ▼6.27
Posts /wp-admin/edit.php3.37 ▲0.0249.44 ▲1.00
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.66 ▼7.77
Media Library /wp-admin/upload.php3.24 ▲0.0134.56 ▲2.06

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_quran_radio_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Quran Radio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4514.25 ▼0.511.55 ▼0.1038.14 ▼5.55
Dashboard /wp-admin2,207 ▲335.49 ▼0.1394.79 ▼9.1167.42 ▲18.22
Posts /wp-admin/edit.php2,121 ▲212.00 ▼0.0138.54 ▼2.9535.06 ▲1.55
Add New Post /wp-admin/post-new.php1,553 ▲2623.04 ▼0.03620.48 ▼19.96173.04 ▲120.71
Media Library /wp-admin/upload.php1,418 ▲184.16 ▼0.0296.91 ▲0.3175.80 ▲32.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_quran_radio_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/quran-radio/radio-admin.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/quran-radio/radio-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quran-radio/radio-hook.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/quran-radio/radio-list.php:4109

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #2, #3, #4, #5 in quran-radio/assets to your readme.txt
You can take inspiration from this readme.txt

quran-radio/radio-admin.php 85% from 13 tests

The entry point to "Quran Radio" version 4.16 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("quran-radio.php" instead of "radio-admin.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin5,021 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP472154,481
PO File12492,739526
CSS15014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity16.75
▷ Minimum method complexity1.00
▷ Maximum method complexity33.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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
23 PNG files occupy 0.18MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
i/Winamp.png2.06KB1.55KB▼ 24.67%
i/tunein.png2.01KB1.25KB▼ 37.94%
i/realplayer.png1.85KB1.54KB▼ 16.98%
i/Play.png1.50KB1.67KB0.00%
screenshot-1.png44.90KB19.19KB▼ 57.26%