84% bangla-ramadan-time

Code Review | Bangla Ramadan Time

WordPress plugin Bangla Ramadan Time scored 84% from 54 tests.

About plugin

  • Plugin page: bangla-ramadan-time
  • Plugin version: 21
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 5.8.1
  • First release: Apr 25, 2020
  • Latest release: Apr 14, 2021
  • Number of updates: 18
  • Update frequency: every 19.7 days
  • Top authors: rashedulhaquerumi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 869 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼142.83ms] Passed 4 tests

An overview of server-side resources used by Bangla Ramadan Time
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0542.35 ▲6.03
Dashboard /wp-admin3.11 ▲0.0550.72 ▲2.37
Posts /wp-admin/edit.php3.16 ▲0.0547.88 ▼0.35
Add New Post /wp-admin/post-new.php5.46 ▲0.0395.08 ▼572.33
Media Library /wp-admin/upload.php3.05 ▲0.0535.97 ▼1.02

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bangla Ramadan Time
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲12115.92 ▲0.0312.10 ▼2.2650.92 ▲1.22
Dashboard /wp-admin2,967 ▲365.89 ▼0.23166.10 ▲10.27114.56 ▼3.33
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0171.50 ▲2.2587.11 ▼5.49
Add New Post /wp-admin/post-new.php1,683 ▲6818.26 ▼3.22417.25 ▲101.14116.96 ▲7.47
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.01171.24 ▲10.56120.12 ▲1.76

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_bangla_ramadan_time_widget

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bangla-ramadan-time/bangla_ramadan_time.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: ramadan, iftar, times, sehri

bangla-ramadan-time/bangla_ramadan_time.php 85% from 13 tests

The main PHP script in "Bangla Ramadan Time" version 21 is automatically included on every request by WordPress
The following require your attention:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "21")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bangla-ramadan-time.php" instead of "bangla_ramadan_time.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 detected372 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions8100.00%
▷ Anonymous functions00.00%
▷ 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 images were found in this plugin