72% world-prayer-time

Code Review | World Prayer Time

WordPress plugin World Prayer Time scored72%from 54 tests.

About plugin

  • Plugin page: world-prayer-time
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 6.3.1
  • First release: Dec 24, 2016
  • Latest release: Jun 2, 2019
  • Number of updates: 43
  • Update frequency: every 20.7 days
  • Top authors: techdabang (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,323 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.01ms] 75% from 4 tests

A check of server-side resources used by World Prayer Time
It is recommended to improve the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 648.05ms on /wp-admin/admin.php?page=world_prayer_times)
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.85 ▼3.32
Dashboard /wp-admin3.33 ▲0.0246.75 ▲0.86
Posts /wp-admin/edit.php3.38 ▲0.0247.13 ▼0.30
Add New Post /wp-admin/post-new.php5.91 ▲0.02102.11 ▲5.86
Media Library /wp-admin/upload.php3.25 ▲0.0236.65 ▼1.26
Author /wp-admin/admin.php?page=world_prayer_plugin_author3.2230.78
World Prayer Times /wp-admin/admin.php?page=world_prayer_times4.11648.05

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for World Prayer Time
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲11713.24 ▼1.561.91 ▲0.2542.58 ▼3.45
Dashboard /wp-admin2,233 ▲455.87 ▲1.01103.86 ▼6.9141.64 ▲0.09
Posts /wp-admin/edit.php2,116 ▲242.02 ▲0.0141.03 ▲0.9135.39 ▼1.09
Add New Post /wp-admin/post-new.php1,556 ▲1423.01 ▲4.75606.01 ▼72.7250.95 ▼2.75
Media Library /wp-admin/upload.php1,415 ▲304.20 ▼0.1595.96 ▼18.1043.17 ▼13.01
Author /wp-admin/admin.php?page=world_prayer_plugin_author8102.0523.9825.71
World Prayer Times /wp-admin/admin.php?page=world_prayer_times1,8531.8324.8026.87

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=world_prayer_times
    • > Notice in wp-content/plugins/world-prayer-time/admin/tuning.php+18
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/world-prayer-time/admin/author.php
    • > /wp-content/plugins/world-prayer-time/world-prayer-times.php
  • 2× 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/world-prayer-time/admin/menu.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/world-prayer-time/admin/tuning.php:12

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (25 tag instead of maximum 10)
The official readme.txt is a good inspiration

world-prayer-time/world-prayer-times.php 92% from 13 tests

Analyzing the main PHP file in "World Prayer Time" version 2.0
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("world-prayer-time.php" instead of "world-prayer-times.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin406 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP57731406

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin