84% daily-hadith

Code Review | Daily Hadith

WordPress plugin Daily Hadith scored84%from 54 tests.

About plugin

  • Plugin page: daily-hadith
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4
  • WordPress version: 6.3.1
  • First release: May 28, 2020
  • Latest release: May 28, 2020
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: rashedulhaquerumi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /694 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.34ms] Passed 4 tests

An overview of server-side resources used by Daily Hadith
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.20 ▲3.01
Dashboard /wp-admin3.34 ▼0.0050.42 ▼18.25
Posts /wp-admin/edit.php3.39 ▲0.0449.01 ▲0.14
Add New Post /wp-admin/post-new.php5.92 ▲0.0487.56 ▼13.36
Media Library /wp-admin/upload.php3.26 ▲0.0436.80 ▼1.89

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_daily_hadith_widget_bangla
db_upgraded
widget_recent-comments
widget_daily_hadith_widget_english
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Daily Hadith
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.44 ▲0.051.98 ▼0.1542.33 ▼4.50
Dashboard /wp-admin2,195 ▲155.55 ▼0.1285.43 ▼11.7343.12 ▼2.12
Posts /wp-admin/edit.php2,097 ▼01.98 ▼0.0737.39 ▼0.2135.38 ▲0.02
Add New Post /wp-admin/post-new.php1,532 ▲123.14 ▲0.08670.95 ▲2.3162.23 ▲11.02
Media Library /wp-admin/upload.php1,403 ▼04.28 ▲0.0997.19 ▼2.9844.52 ▼2.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_daily_hadith_widget_bangla
    • can_compress_scripts
    • widget_daily_hadith_widget_english
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/daily-hadith/daily_hadith.php:16

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: quran, hadith

daily-hadith/daily_hadith.php 92% from 13 tests

Analyzing the main PHP file in "Daily Hadith" version 1.0
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("daily-hadith.php" instead of "daily_hadith.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin268 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16034151
CSS151117

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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
No PNG files were detected