78% wp-prayers-request

Code Review | WP Prayer II

WordPress plugin WP Prayer II scored78%from 54 tests.

About plugin

  • Plugin page: wp-prayers-request
  • Plugin version: 2.4.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 14, 2017
  • Latest release: Aug 23, 2023
  • Number of updates: 130
  • Update frequency: every 17.4 days
  • Top authors: abrg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /18,375 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▲1.65ms] Passed 4 tests

An overview of server-side resources used by WP Prayer II
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3236.98 ▼0.56
Dashboard /wp-admin3.58 ▲0.2849.26 ▲2.84
Posts /wp-admin/edit.php3.71 ▲0.3553.02 ▲0.49
Add New Post /wp-admin/post-new.php6.17 ▲0.2893.04 ▲3.81
Media Library /wp-admin/upload.php3.51 ▲0.2837.68 ▲6.80
Email Settings /wp-admin/edit.php?post_type=prayers&page=pray-email-settings3.5232.56
Settings /wp-admin/edit.php?post_type=prayers&page=pray-settings3.5830.89
Prayers Performed /wp-admin/edit.php?post_type=prayers_performed3.5634.76
Add Prayer /wp-admin/post-new.php?post_type=prayers3.6650.80
Categories /wp-admin/edit-tags.php?taxonomy=prayertypes&post_type=prayers3.5041.93
List Prayers /wp-admin/edit.php?post_type=prayers3.5638.86

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 18 new options
New WordPress options
upr_prayer_send_admin_email
widget_recent-posts
upr_show_prayer_category
db_upgraded
upr_login_not_required_request
upr_prayer_default_status_pending
upr_display_username_on_prayer_listing
upr_prayer_hide_captcha
can_compress_scripts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Prayer II
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲19713.93 ▼0.365.01 ▲3.1043.25 ▼1.89
Dashboard /wp-admin2,239 ▲485.87 ▲1.0299.45 ▼12.6771.76 ▲27.51
Posts /wp-admin/edit.php2,137 ▲452.01 ▲0.0439.07 ▼2.9333.95 ▼1.84
Add New Post /wp-admin/post-new.php1,552 ▲3823.01 ▲5.43753.40 ▲67.5553.53 ▲2.42
Media Library /wp-admin/upload.php1,427 ▲394.20 ▲0.0296.66 ▼0.8571.00 ▲23.45
Email Settings /wp-admin/edit.php?post_type=prayers&page=pray-email-settings9532.0224.7527.12
Settings /wp-admin/edit.php?post_type=prayers&page=pray-settings1,1292.0223.9024.11
Prayers Performed /wp-admin/edit.php?post_type=prayers_performed1,0951.9631.4528.58
Add Prayer /wp-admin/post-new.php?post_type=prayers2,6477.75174.72129.77
Categories /wp-admin/edit-tags.php?taxonomy=prayertypes&post_type=prayers1,3102.1425.5029.94
List Prayers /wp-admin/edit.php?post_type=prayers1,1391.9529.9631.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-prayers-request/inc/upr_shortcode.php
    • > /wp-content/plugins/wp-prayers-request/user-prayers-request.php
    • > /wp-content/plugins/wp-prayers-request/inc/captcha.php
    • > /wp-content/plugins/wp-prayers-request/inc/upr_email_settings.php
    • > /wp-content/plugins/wp-prayers-request/inc/upr_settings.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Trying to access array offset on value of type bool in wp-content/plugins/wp-prayers-request/inc/phptextClass.php on line 310
    • > PHP Notice
      Trying to access array offset on value of type bool in wp-content/plugins/wp-prayers-request/inc/phptextClass.php on line 307
    • > PHP Warning
      imagettfbbox(): Could not find/open font in wp-content/plugins/wp-prayers-request/inc/phptextClass.php on line 304
    • > PHP Notice
      Trying to access array offset on value of type bool in wp-content/plugins/wp-prayers-request/inc/phptextClass.php on line 307
    • > PHP Warning
      imagettftext(): Could not find/open font in wp-content/plugins/wp-prayers-request/inc/phptextClass.php on line 186
    • > PHP Notice
      Trying to access array offset on value of type bool in wp-content/plugins/wp-prayers-request/inc/phptextClass.php on line 310

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 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
5 plugin tags: ministry, pray, prayer, church, bible

wp-prayers-request/user-prayers-request.php 85% from 13 tests

The main PHP script in "WP Prayer II" version 2.4.6 is automatically included on every request by WordPress
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-prayers-request.php" instead of "user-prayers-request.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin8,287 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS3176176,313
PHP63531311,727
JavaScript1520219
SVG10028

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity35.00
▷ Minimum class complexity12.00
▷ Maximum class complexity64.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2187.50%
▷ Protected methods312.50%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/pray.png0.62KB0.67KB0.00%