84% ramadan

Code Review | Ramadan

WordPress plugin Ramadan scored 84% from 54 tests.

About plugin

  • Plugin page: ramadan
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Mar 2, 2023
  • Latest release: Mar 21, 2023
  • Number of updates: 14
  • Update frequency: every 1.4 days
  • Top authors: Aminulbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 264 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.15MB] [CPU: ▲16.74ms] Passed 4 tests

Server-side resources used by Ramadan
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.27 ▲1.8188.81 ▲48.86
Dashboard /wp-admin5.07 ▲1.7765.24 ▲20.84
Posts /wp-admin/edit.php5.17 ▲1.8181.92 ▲32.81
Add New Post /wp-admin/post-new.php6.68 ▲0.79108.09 ▲9.91
Media Library /wp-admin/upload.php3.47 ▲0.2437.32 ▲3.40
Ramadan /wp-admin/options-general.php?page=ramadan3.4436.59

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Ramadan
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.63 ▼0.771.54 ▼0.1236.52 ▼3.53
Dashboard /wp-admin2,210 ▲305.79 ▲0.7196.23 ▼24.7738.37 ▼0.20
Posts /wp-admin/edit.php2,093 ▲11.98 ▼0.0539.51 ▼0.8435.60 ▼1.44
Add New Post /wp-admin/post-new.php6,431 ▲4,89520.92 ▼2.18953.11 ▲287.7938.78 ▼18.18
Media Library /wp-admin/upload.php1,383 ▼54.29 ▲0.09101.24 ▼3.4243.11 ▼0.23
Ramadan /wp-admin/options-general.php?page=ramadan9862.1824.6823.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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 | 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
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/ramadan/build/month-links/render.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/ramadan/build/monthly/render.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/ramadan/build/ramadan/render.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/ramadan/build/daily/render.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/ramadan/build/yearly/render.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/ramadan/build/city-selector/render.php:8

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 issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: block

ramadan/ramadan.php Passed 13 tests

The entry point to "Ramadan" version 1.0.4 is a PHP file that has certain tags in its header comment area
48 characters long description:
Display ramadan and prayer time in your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected2,069 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP21151451,369
JSON600345
PO File1129185292
CSS19057
JavaScript6006

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.29
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods57
▷ Static methods1017.54%
▷ Public methods5596.49%
▷ Protected methods00.00%
▷ Private methods23.51%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin