10% listen-to-quran-verses

Code Review | Listen to Quran Verses

WordPress plugin Listen to Quran Verses scored10%from 54 tests.

About plugin

  • Plugin page: listen-to-quran-v...
  • Plugin version: 2.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Oct 12, 2012
  • Latest release: Apr 23, 2015
  • Number of updates: 129
  • Update frequency: every 7.2 days
  • Top authors: ibralnet (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /4,172 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/listen-to-quran-verses/widget/widget.php+116
    Function create_function() is deprecated

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

An overview of server-side resources used by Listen to Quran Verses
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.09 ▼36.53
Dashboard /wp-admin2.05 ▼1.305.20 ▼60.38
Posts /wp-admin/edit.php2.05 ▼1.315.00 ▼46.97
Add New Post /wp-admin/post-new.php2.05 ▼3.846.11 ▼93.35
Media Library /wp-admin/upload.php2.05 ▼1.187.05 ▼29.32
Listen To Quran Verses /wp-admin/options-general.php?page=listen-to-quran-verses2.055.14

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_random_recitation_widget
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Listen to Quran Verses
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▲0.071.72 ▲0.1942.10 ▲1.99
Dashboard /wp-admin2,199 ▲255.65 ▲0.1283.53 ▼13.4140.46 ▲0.99
Posts /wp-admin/edit.php2,101 ▲11.99 ▲0.0337.76 ▲2.4934.61 ▲1.10
Add New Post /wp-admin/post-new.php1,529 ▼823.63 ▲5.52626.19 ▼0.0860.24 ▼8.24
Media Library /wp-admin/upload.php1,407 ▲74.17 ▲0.06104.55 ▼13.2347.06 ▼4.53
Listen To Quran Verses /wp-admin/options-general.php?page=listen-to-quran-verses8651.9924.9637.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/listen-to-quran-verses/widget/widget.php+116
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_random_recitation_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=listen-to-quran-verses
    • > Deprecated in wp-content/plugins/listen-to-quran-verses/widget/widget.php+116
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=listen-to-quran-verses
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Random_Recitation_Widget is deprecated since version 4.3.0! Use __construct() instead.

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
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/listen-to-quran-verses/mqv.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/listen-to-quran-verses/administration.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mqvLoadDictionary() in wp-content/plugins/listen-to-quran-verses/admin-form.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/listen-to-quran-verses/widget/widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Enlgish interface showing the new interface), #2 (Enlgish interface showing the new autocomplete function & repeat the whole interface hint), #3 (German version of the widget to play a random ayah every time the page loaded), #4 (English version of the administration interface to change the plugin language)
Please take inspiration from this readme.txt

listen-to-quran-verses/mqv.php 85% from 13 tests

"Listen to Quran Verses" version 2.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 287 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("listen-to-quran-verses.php" instead of "mqv.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 plugin2,064 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101351171,247
PHP96238416
CSS33038310
HTML271191

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.16
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
17 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/ui-lightness/images/ui-icons_228ef1_256x240.png4.27KB4.11KB▼ 3.78%
css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png0.25KB0.15KB▼ 37.45%
css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png0.25KB0.15KB▼ 39.62%
css/ui-lightness/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%