74% month-of-ramadan

Code Review | Month of Ramadan

WordPress plugin Month of Ramadan scored74%from 54 tests.

About plugin

  • Plugin page: month-of-ramadan
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1-2.1
  • WordPress version: 6.3.1
  • First release: Sep 16, 2012
  • Latest release: Sep 16, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: siamakhadadi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,477 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.93MB] [CPU: ▼53.76ms] Passed 4 tests

This is a short check of server-side resources used by Month of Ramadan
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.87 ▼38.01
Dashboard /wp-admin2.08 ▼1.226.69 ▼44.28
Posts /wp-admin/edit.php2.08 ▼1.285.95 ▼41.26
Add New Post /wp-admin/post-new.php2.08 ▼3.814.63 ▼91.47
Media Library /wp-admin/upload.php2.08 ▼1.155.57 ▼26.24

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Month of Ramadan
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼0.951.69 ▲0.0136.23 ▼7.58
Dashboard /wp-admin2,209 ▲384.83 ▼1.08112.38 ▲7.2642.35 ▼4.14
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0540.44 ▲2.5936.87 ▲2.44
Add New Post /wp-admin/post-new.php1,533 ▼123.15 ▲0.06668.78 ▼7.0647.87 ▼19.77
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0696.19 ▼7.5838.93 ▼9.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/month-of-ramadan/month-of-ramadan.php+400
    Undefined variable: after_widget
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/month-of-ramadan/month-of-ramadan.php:406

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === month-of-ramadan === )
The official readme.txt is a good inspiration

month-of-ramadan/month-of-ramadan.php Passed 13 tests

The principal PHP file in "Month of Ramadan" v. 1.0 is loaded by WordPress automatically on each request
107 characters long description:
The plugin prayer during Ramadan. Persian text of the Prayer Book is Mafatih Aljnan / Publications dehghan.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin827 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP214429827

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png6.16KB1.83KB▼ 70.39%