79% nafeza-prayer-time

Code Review | Nafeza Prayer Time

WordPress plugin Nafeza Prayer Time scored79%from 54 tests.

About plugin

  • Plugin page: nafeza-prayer-time
  • Plugin version: 1.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 25, 2017
  • Latest release: Nov 11, 2023
  • Number of updates: 48
  • Update frequency: every 44.7 days
  • Top authors: free.php (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /3,748 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: ▲0.30MB] [CPU: ▼4.90ms] Passed 4 tests

This is a short check of server-side resources used by Nafeza Prayer Time
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2937.78 ▼2.63
Dashboard /wp-admin3.63 ▲0.2947.97 ▼9.03
Posts /wp-admin/edit.php3.75 ▲0.3958.62 ▲11.56
Add New Post /wp-admin/post-new.php6.21 ▲0.3390.29 ▼9.96
Media Library /wp-admin/upload.php3.54 ▲0.3136.00 ▲2.04
Prayer Times /wp-admin/options-general.php?page=nafeza_prayer_time_admin_page3.5438.93

Server storage [IO: ▲0.11MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_nafeza_prayer_time_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Nafeza Prayer Time: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲17314.34 ▼0.081.74 ▼0.1441.63 ▼2.34
Dashboard /wp-admin2,341 ▲1696.11 ▲0.49121.75 ▲14.0442.27 ▲5.17
Posts /wp-admin/edit.php2,270 ▲1673.40 ▲1.4454.42 ▲10.7534.74 ▼1.66
Add New Post /wp-admin/post-new.php1,531 ▲523.10 ▲0.01629.99 ▲14.4635.08 ▼16.62
Media Library /wp-admin/upload.php1,406 ▲34.14 ▼0.0682.76 ▼21.8541.09 ▼4.33
Prayer Times /wp-admin/options-general.php?page=nafeza_prayer_time_admin_page1,2832.9839.0065.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_nafeza_prayer_time_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/nafeza-prayer-time/includes/setting.php
    • > /wp-content/plugins/nafeza-prayer-time/includes/views.php
    • > /wp-content/plugins/nafeza-prayer-time/includes/functions.php
    • > /wp-content/plugins/nafeza-prayer-time/includes/widget.php
    • > /wp-content/plugins/nafeza-prayer-time/nafeza-prayer-time.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=nafeza_prayer_time_admin_page
    • > Javascript (severe) in unknown
    /wp-content/plugins/nafeza-prayer-time//js/upload_icon.js?ver=1.1.0 22:0 Uncaught TypeError: $ is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: mosque, muslim, ezan, religious, worship...

nafeza-prayer-time/nafeza-prayer-time.php Passed 13 tests

The main PHP script in "Nafeza Prayer Time" version 1.2.9 is automatically included on every request by WordPress
31 characters long description:
Prayer times all over the world

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
There were no executable files found in this plugin2,933 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP668192,671
PO File2900230
JavaScript14025
CSS1007

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
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
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected