84% holy-quran-random-verse-multilanguage

Code Review | Holy Quran random verse Multilanguage

WordPress plugin Holy Quran random verse Multilanguage scored84%from 54 tests.

About plugin

  • Plugin page: holy-quran-random...
  • Plugin version: 1.2.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Feb 2, 2014
  • Latest release: May 15, 2022
  • Number of updates: 88
  • Update frequency: every 34.4 days
  • Top authors: karim42 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /5,814 total downloads

Benchmarks

Plugin footprint 82% 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.05MB] [CPU: ▼2.52ms] Passed 4 tests

Server-side resources used by Holy Quran random verse Multilanguage
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.71 ▼2.99
Dashboard /wp-admin3.36 ▲0.0643.76 ▼2.58
Posts /wp-admin/edit.php3.41 ▲0.0549.33 ▲5.21
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.32 ▼2.81
Media Library /wp-admin/upload.php3.28 ▲0.0531.61 ▼1.68

Server storage [IO: ▲28.78MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please try to fix the following items
  • Total filesystem usage should be limited to 25MB (currently using 28.78MB)
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_quran_random

Browser metrics Passed 4 tests

A check of browser resources used by Holy Quran random verse Multilanguage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.85 ▼0.8013.45 ▲11.7143.57 ▲5.78
Dashboard /wp-admin2,206 ▲175.87 ▲0.91106.38 ▼5.0441.51 ▲0.16
Posts /wp-admin/edit.php2,089 ▼02.17 ▲0.1239.02 ▼0.4035.49 ▲3.05
Add New Post /wp-admin/post-new.php1,543 ▲2418.55 ▼4.45588.11 ▼84.6654.20 ▼2.90
Media Library /wp-admin/upload.php1,385 ▲34.18 ▼0.04101.93 ▲5.5144.77 ▼2.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_quran_random
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/holy-quran-random-verse-multilanguage/quran-multilanguage-widget.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: muslim, quran translate, islam, quran verse, coran en texte...

holy-quran-random-verse-multilanguage/quran-multilanguage-widget.php 92% from 13 tests

Analyzing the main PHP file in "Holy Quran random verse Multilanguage" version 1.2.10
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("holy-quran-random-verse-multilanguage.php" instead of "quran-multilanguage-widget.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 plugin4,195 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,7481,0363,998
PHP1298197

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity82.00
▷ Minimum class complexity82.00
▷ Maximum class complexity82.00
Average method complexity21.25
▷ Minimum method complexity1.00
▷ Maximum method complexity61.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%
Functions3
▷ Named functions3100.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
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/jscolor/hv.png2.80KB7.32KB0.00%
img/play.png0.94KB1.01KB0.00%
js/jscolor/hs.png2.62KB7.54KB0.00%