74% holy-quran-random-ayahs

Code Review | Holy Quran

WordPress plugin Holy Quran scored 74% from 54 tests.

About plugin

  • Plugin page: holy-quran-random...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.4.1
  • WordPress version: 6.3.1
  • First release: Jul 28, 2011
  • Latest release: Aug 17, 2012
  • Number of updates: 15
  • Update frequency: every 25.7 days
  • Top authors: webgalli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,955 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼1.93MB] [CPU: ▼54.31ms] Passed 4 tests

This is a short check of server-side resources used by Holy Quran
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.403.87 ▼32.67
Dashboard /wp-admin2.08 ▼1.235.05 ▼44.51
Posts /wp-admin/edit.php2.08 ▼1.285.78 ▼43.41
Add New Post /wp-admin/post-new.php2.08 ▼3.815.56 ▼96.63
Media Library /wp-admin/upload.php2.08 ▼1.155.00 ▼28.50

Server storage [IO: ▲10.23MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Holy Quran: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.16 ▼1.261.78 ▲0.2438.54 ▼10.29
Dashboard /wp-admin2,200 ▲125.83 ▲0.92109.91 ▼4.5443.29 ▼3.75
Posts /wp-admin/edit.php2,086 ▼32.02 ▲0.0136.27 ▼4.3931.38 ▼4.16
Add New Post /wp-admin/post-new.php1,542 ▲1418.23 ▲0.04651.11 ▲45.0155.64 ▼2.02
Media Library /wp-admin/upload.php1,382 ▼94.19 ▼0.0294.52 ▼6.6542.04 ▼1.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/holy-quran-random-ayahs/holy-Quran.php:168

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === holy-quran-random-ayahs === )
You can take inspiration from this readme.txt

holy-quran-random-ayahs/holy-Quran.php 92% from 13 tests

"Holy Quran" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("holy-quran-random-ayahs.php" instead of "holy-Quran.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
Good job! No executable or dangerous file extensions detected140 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11121138
JavaScript1032

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin