10% ayat-al-quran

Code Review | Ayat Al-Quran

WordPress plugin Ayat Al-Quran scored10%from 54 tests.

About plugin

  • Plugin page: ayat-al-quran
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Sep 30, 2012
  • Latest release: Oct 2, 2012
  • Number of updates: 16
  • Update frequency: every 0.2 days
  • Top authors: suganux (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,079 total downloads


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
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/ayat-al-quran/AyatAlQuran.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; AyatAlQuranWidget has a deprecated constructor

Server metrics [RAM: ▼1.94MB] [CPU: ▼60.95ms] Passed 4 tests

Analyzing server-side resources used by Ayat Al-Quran
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.31 ▼34.47
Dashboard /wp-admin2.08 ▼1.265.69 ▼56.99
Posts /wp-admin/edit.php2.08 ▼1.276.21 ▼46.20
Add New Post /wp-admin/post-new.php2.08 ▼3.816.49 ▼106.14
Media Library /wp-admin/upload.php2.08 ▼1.154.72 ▼30.23

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Ayat Al-Quran
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.121.64 ▼0.3039.41 ▼0.87
Dashboard /wp-admin2,203 ▲155.91 ▲0.95108.81 ▲8.3243.56 ▼1.37
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0337.71 ▼6.3336.54 ▲0.94
Add New Post /wp-admin/post-new.php1,542 ▲2818.32 ▲0.64618.38 ▼63.3148.19 ▼4.96
Media Library /wp-admin/upload.php1,388 ▼04.30 ▲0.19100.58 ▼7.6139.75 ▼6.80

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
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/ayat-al-quran/AyatAlQuran.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; AyatAlQuranWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_ayatalquranwidget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ayat-al-quran/AyatAlQuran.php:12

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


Plugin configuration 93% 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
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === ayat-al-quran === )
Please take inspiration from this readme.txt

ayat-al-quran/AyatAlQuran.php 92% from 13 tests

Analyzing the main PHP file in "Ayat Al-Quran" version 2.0
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ayat-al-quran.php" instead of "AyatAlQuran.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
No dangerous file extensions were detected57 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin