78% quran-live

Code Review | Quran Live Multilanguage

WordPress plugin Quran Live Multilanguage scored78%from 54 tests.

About plugin

  • Plugin page: quran-live
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Oct 25, 2018
  • Latest release: Feb 2, 2022
  • Number of updates: 17
  • Update frequency: every 70.9 days
  • Top authors: karim42 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,279 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼11.66ms] Passed 4 tests

An overview of server-side resources used by Quran Live Multilanguage
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0223.18 ▼20.50
Dashboard /wp-admin3.36 ▲0.0645.31 ▼7.68
Posts /wp-admin/edit.php3.41 ▲0.0643.97 ▼5.06
Add New Post /wp-admin/post-new.php5.94 ▲0.0691.36 ▼13.40
Media Library /wp-admin/upload.php3.28 ▲0.0638.31 ▲5.18

Server storage [IO: ▲38.84MB] [DB: ▲0.00MB] 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 38.84MB)
Filesystem: 68 new files
Database: no new tables, 9 new options
New WordPress options
quran_live_languages
widget_recent-posts
db_upgraded
quran_live_recitator
widget_theysaidso_widget
template_quran_live
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Quran Live Multilanguage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲18713.92 ▼0.389.02 ▲6.6637.08 ▼8.02
Dashboard /wp-admin2,217 ▲295.88 ▲0.8098.36 ▼10.5385.71 ▲38.10
Posts /wp-admin/edit.php2,097 ▲82.01 ▼0.0433.13 ▼8.1230.33 ▼6.46
Add New Post /wp-admin/post-new.php1,678 ▲14222.47 ▼0.73686.73 ▲70.4654.88 ▲1.66
Media Library /wp-admin/upload.php1,402 ▲174.17 ▼0.0596.13 ▼6.6869.69 ▲24.54

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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
Please take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/quran-live/admin/js/jscolor/index.php
    • > /wp-content/plugins/quran-live/admin/quran-live-admin.php
    • > /wp-content/plugins/quran-live/data/index.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/quran-live/template/template.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/quran-live/inc/quran_live_styles.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/quran-live/quran-live.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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

quran-live/quran-live.php Passed 13 tests

The main file in "Quran Live Multilanguage" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
54 characters long description:
Quran live Multilanguage translated into 29 languages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected3,227 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
XML1001,583
JavaScript3168441,022
PHP827371613
HTML1309

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
7 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
template/images/icon_quran.png1.60KB1.50KB▼ 6.63%
icon_quranlive.png1.58KB1.49KB▼ 5.73%
template/images/pause.png1.87KB1.81KB▼ 3.23%
admin/js/jscolor/hv.png2.80KB7.32KB0.00%
template/images/icon_fullscreen.png1.76KB1.59KB▼ 9.71%