77% pray-time

Code Review | Pray Time

WordPress plugin Pray Time scored77%from 54 tests.

About plugin

  • Plugin page: pray-time
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 31, 2016
  • Latest release: Mar 31, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: mrkindy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,106 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.73ms] Passed 4 tests

Analyzing server-side resources used by Pray Time
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.77 ▼5.22
Dashboard /wp-admin3.32 ▼0.0344.12 ▼17.54
Posts /wp-admin/edit.php3.37 ▲0.0145.67 ▼2.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.07 ▼6.03
Media Library /wp-admin/upload.php3.24 ▲0.0132.00 ▼0.73

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_pray_times
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Pray Time: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.62 ▼0.861.58 ▼0.1141.43 ▼2.21
Dashboard /wp-admin2,206 ▲154.88 ▲0.00111.17 ▼8.1138.01 ▼7.77
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0439.17 ▲4.5434.60 ▼1.77
Add New Post /wp-admin/post-new.php1,535 ▲1623.30 ▼0.14667.06 ▲11.5970.35 ▲15.30
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0196.27 ▲0.9741.38 ▼1.26

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_pray_times
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/pray-time/pray-times-view.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pray-time/pray-times-view.php on line 20
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pray-time/pray-times-view.php on line 12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pray-time/pray-times-view.php on line 32
    • > PHP Notice
      Undefined variable: times in wp-content/plugins/pray-time/pray-times-view.php on line 28
    • > PHP Notice
      Undefined variable: times in wp-content/plugins/pray-time/pray-times-view.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pray-time/pray-times-view.php on line 24
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pray-time/pray-times-view.php on line 28
    • > PHP Notice
      Undefined variable: times in wp-content/plugins/pray-time/pray-times-view.php on line 12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pray-time/pray-times-view.php on line 16
    • > PHP Notice
      Undefined variable: times in wp-content/plugins/pray-time/pray-times-view.php on line 32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Widget) image not found
The official readme.txt might help

pray-time/pray-times.php 77% from 13 tests

The main PHP script in "Pray Time" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pray-time.php" instead of "pray-times.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin527 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3155136512
HTML1208
CSS1077

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity26.50
▷ Minimum class complexity18.00
▷ Maximum class complexity35.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods50
▷ Static methods00.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/masjid.png11.33KB4.21KB▼ 62.82%