10% quran-verse-a-day

Code Review | Quran verse a day

WordPress plugin Quran verse a day scored10%from 54 tests.

About plugin

  • Plugin page: quran-verse-a-day
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Jan 2, 2017
  • Number of updates: 19
  • Update frequency: every 25.4 days
  • Top authors: mmrs151 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,011 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/quran-verse-a-day/QuranDB.php+74
    Undefined offset: 1

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.23ms] Passed 4 tests

Server-side resources used by Quran verse a day
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2541.82 ▼2.78
Dashboard /wp-admin3.42 ▲0.0848.22 ▼10.47
Posts /wp-admin/edit.php3.53 ▲0.1849.04 ▲1.09
Add New Post /wp-admin/post-new.php6.00 ▲0.1191.43 ▲0.40
Media Library /wp-admin/upload.php3.34 ▲0.1136.77 ▼0.06

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 10 new files
Database: 1 new table, 7 new options
New tables
wp_quranADay
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
widget_quranadaywidget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Quran verse a day
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.30 ▼1.081.64 ▼0.1842.44 ▼3.59
Dashboard /wp-admin2,208 ▲195.86 ▲0.92103.27 ▼13.4741.94 ▲3.63
Posts /wp-admin/edit.php2,091 ▲22.03 ▼0.0140.45 ▼0.0235.01 ▼1.48
Add New Post /wp-admin/post-new.php1,544 ▲3018.42 ▲0.66609.88 ▼62.8562.52 ▲0.92
Media Library /wp-admin/upload.php1,381 ▼104.21 ▲0.0499.83 ▲1.7842.84 ▼2.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_quranadaywidget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/quran-verse-a-day/QuranDB.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/quran-verse-a-day/QuranDB.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/quran-verse-a-day/QuranDB.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/quran-verse-a-day/QuranDB.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/quran-verse-a-day/QuranDB.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/quran-verse-a-day/QuranDB.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/quran-verse-a-day/QuranDB.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/quran-verse-a-day/QuranDB.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/quran-verse-a-day/QuranDB.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: islam, muslim, ayat, verser, quran

quran-verse-a-day/QuranADayWidget.php 92% from 13 tests

Analyzing the main PHP file in "Quran verse a day" version 1.9
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("quran-verse-a-day.php" instead of "QuranADayWidget.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Please make sure to remedy the following
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bin - Binary Executable in Windows, macOS, Linux
      • wp-content/plugins/quran-verse-a-day/quran/file.bin
727 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP56138700
CSS14027

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.40
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1260.00%
▷ Protected methods00.00%
▷ Private methods840.00%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin