10% quran-text-multilanguage

Code Review | Quran multilanguage Text & Audio

WordPress plugin Quran multilanguage Text & Audio scored10%from 54 tests.

About plugin

  • Plugin page: quran-text-multil...
  • Plugin version: 2.3.20
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 28, 2014
  • Latest release: Jun 6, 2023
  • Number of updates: 276
  • Update frequency: every 12.4 days
  • Top authors: karim42 (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

700+ active /21,135 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
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/quran-text-multilanguage/inc/functions_quran.php+158
    Undefined variable: sura

Server metrics [RAM: ▼1.83MB] [CPU: ▼51.87ms] Passed 4 tests

This is a short check of server-side resources used by Quran multilanguage Text & Audio
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.315.64 ▼30.00
Dashboard /wp-admin2.17 ▼1.137.08 ▼43.68
Posts /wp-admin/edit.php2.17 ▼1.187.05 ▼41.43
Add New Post /wp-admin/post-new.php2.17 ▼3.716.65 ▼92.36
Media Library /wp-admin/upload.php2.17 ▼1.057.89 ▼26.76

Server storage [IO: ▲48.23MB] [DB: ▲0.01MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • Total filesystem usage must be limited to 25MB (currently using 48.23MB)
Filesystem: 238 new files
Database: 1 new table, 21 new options
New tables
quran
New WordPress options
text_quran_title
background_quran_trans
quran_changerecitatortxt
verse_quran_number
can_compress_scripts
background_quran_title
db_upgraded
widget_recent-comments
background_quran_number
quran_template
...

Browser metrics Passed 4 tests

An overview of browser requirements for Quran multilanguage Text & Audio
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15214.02 ▼0.3519.89 ▲18.3037.85 ▼2.30
Dashboard /wp-admin2,209 ▲285.65 ▼0.0679.90 ▼17.3383.96 ▲41.87
Posts /wp-admin/edit.php2,117 ▲202.00 ▲0.0434.00 ▼9.3433.32 ▼3.26
Add New Post /wp-admin/post-new.php1,550 ▲2223.31 ▲0.43682.96 ▲45.9845.06 ▼6.85
Media Library /wp-admin/upload.php1,411 ▲84.22 ▲0.0196.85 ▼8.7763.91 ▲19.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/quran-text-multilanguage/inc/functions_quran.php+158
    Undefined variable: sura
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 21× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/quran-text-multilanguage/css/msdropdown/index.php
    • > /wp-content/plugins/quran-text-multilanguage/inc/templates/template-4/index.php
    • > /wp-content/plugins/quran-text-multilanguage/admin/index.php
    • > /wp-content/plugins/quran-text-multilanguage/inc/images/msdropdown/icons/index.php
    • > /wp-content/plugins/quran-text-multilanguage/inc/images/country/index.php
    • > /wp-content/plugins/quran-text-multilanguage/inc/quran/index.php
    • > /wp-content/plugins/quran-text-multilanguage/inc/templates/template-3/index.php
    • > /wp-content/plugins/quran-text-multilanguage/admin/js/index.php
    • > /wp-content/plugins/quran-text-multilanguage/inc/images/msdropdown/index.php
    • > /wp-content/plugins/quran-text-multilanguage/inc/templates/template-5/index.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/quran-text-multilanguage/inc/template.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/quran-text-multilanguage/admin/quran-admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can take inspiration from this readme.txt

quran-text-multilanguage/quran-text-multilanguage.php Passed 13 tests

Analyzing the main PHP file in "Quran multilanguage Text & Audio" version 2.3.20
124 characters long description:
Quran Text Multilanguage translated into 29 languages. Full ajax version and responsive. Fully customizable. More reciter...

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
Good job! No executable or dangerous file extensions detected12,666 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript910,6392,2199,341
XML1001,583
PHP79441101,474
CSS6777213
SVG10146
HTML1309

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
106 PNG files occupy 1.60MB with 0.75MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/templates/template-5/b-g.png18.69KB8.04KB▼ 56.99%
inc/images/Pause-icon.png10.32KB5.83KB▼ 43.48%
inc/templates/template-5/b-d.png18.44KB8.08KB▼ 56.16%
inc/images/country/pk.png0.56KB0.68KB0.00%
inc/templates/top.png39.43KB7.90KB▼ 79.97%