10% prayer-supporter

Code Review | Prayer Supporter

WordPress plugin Prayer Supporter scored10%from 54 tests.

About plugin

  • Plugin page: prayer-supporter
  • Plugin version: 0.5.3 beta...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Jan 10, 2013
  • Latest release: Mar 23, 2013
  • Number of updates: 35
  • Update frequency: every 2.1 days
  • Top authors: griffgj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,404 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/prayer-supporter/calendar.php+32
    Illegal string offset 'timezone'

Server metrics [RAM: ▼1.63MB] [CPU: ▼52.21ms] Passed 4 tests

Analyzing server-side resources used by Prayer Supporter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.36 ▼1.116.38 ▼35.08
Dashboard /wp-admin2.38 ▼0.938.48 ▼42.15
Posts /wp-admin/edit.php2.38 ▼0.987.62 ▼38.53
Add New Post /wp-admin/post-new.php2.38 ▼3.518.75 ▼93.09
Media Library /wp-admin/upload.php2.38 ▼0.857.87 ▼30.42
Prayer Needs /wp-admin/admin.php?page=resources2.386.32
Add Prayer Need /wp-admin/admin.php?page=addneeds2.388.55
Settings /wp-admin/admin.php?page=settings2.387.32
Requests /wp-admin/admin.php?page=orders2.387.23

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 116 new files
Database: 2 new tables, 17 new options
New tables
wp_res_needs
wp_res_orders
New WordPress options
res_name
res_color
theysaidso_admin_options
can_compress_scripts
res_security_settings
widget_recent-posts
res_terms
widget_theysaidso_widget
res_email
db_upgraded
...

Browser metrics Passed 4 tests

Prayer Supporter: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,031 ▲28514.39 ▼0.008.99 ▲6.9842.23 ▲0.10
Dashboard /wp-admin2,242 ▲515.12 ▲0.08104.62 ▼1.8971.46 ▲30.06
Posts /wp-admin/edit.php2,146 ▲572.49 ▲0.5153.32 ▲16.5938.23 ▼0.10
Add New Post /wp-admin/post-new.php1,709 ▲18222.30 ▲4.06706.45 ▲74.3930.93 ▼27.57
Media Library /wp-admin/upload.php1,433 ▲454.53 ▲0.35119.08 ▲11.4478.83 ▲33.74
Prayer Needs /wp-admin/admin.php?page=resources9432.0428.9629.85
Add Prayer Need /wp-admin/admin.php?page=addneeds8581.9928.9427.16
Settings /wp-admin/admin.php?page=settings1,1042.0129.5126.03
Requests /wp-admin/admin.php?page=orders9261.9627.6025.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/prayer-supporter/calendar.php+32
    Illegal string offset 'timezone'
  • Zombie tables detected upon uninstall: 2 tables
    • wp_res_orders
    • wp_res_needs
  • The uninstall procedure has failed, leaving 17 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • res_calendar_color
    • res_email
    • res_name
    • res_incl_email
    • res_color
    • res_security_plugin
    • can_compress_scripts
    • widget_theysaidso_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > Warning in wp-content/plugins/prayer-supporter/calendar.php+32
    Illegal string offset 'timezone'
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > Warning in wp-content/plugins/prayer-supporter/calendar.php+45
    Cannot assign an empty string to a string offset
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > Warning in wp-content/plugins/prayer-supporter/calendar.php+33
    Illegal string offset 'envself'
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > Warning in wp-content/plugins/prayer-supporter/calendar.php+34
    Illegal string offset 'wp_path'
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > Warning in wp-content/plugins/prayer-supporter/calendar.php+35
    Illegal string offset 'table_name'
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > Warning in wp-content/plugins/prayer-supporter/calendar.php+47
    Illegal string offset 'ajax'
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > Notice in wp-content/plugins/prayer-supporter/calendar.php+47
    Uninitialized string offset: 0
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > User deprecated in wp-includes/functions.php+5453
    Function get_settings is deprecated since version 2.1.0! Use get_option() instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > Notice in wp-content/plugins/prayer-supporter/prayer-supporter.php+36
    Undefined index: REDIRECT_URL
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > Notice in wp-content/plugins/prayer-supporter/prayer-supporter.php+764
    Undefined index: action
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > Notice in wp-content/plugins/prayer-supporter/prayer-supporter.php+248
    Undefined index: HTTP_X_REQUESTED_WITH
  • 44 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/admin.php?page=addneeds
    • > Notice in wp-content/plugins/prayer-supporter/prayer-supporter.php+708
    Undefined index: submit
    • > GET request to /wp-admin/admin.php?page=settings
    • > Notice in wp-content/plugins/prayer-supporter/prayer-supporter.php+450
    Undefined index: change_settings
    • > GET request to /wp-admin/admin.php?page=settings
    • > Deprecated in wp-content/plugins/prayer-supporter/prayer-supporter.php+548
    The each() function is deprecated. This message will be suppressed on further calls
    • > GET request to /wp-admin/admin.php?page=orders
    • > Notice in wp-content/plugins/prayer-supporter/prayer-supporter.php+731
    Undefined index: add_order

SRP 50% 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 take a closer look at the following
  • 23× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Illegal string offset 'timezone' in wp-content/plugins/prayer-supporter/calendar.php on line 32
    • > PHP Notice
      Uninitialized string offset: 0 in wp-content/plugins/prayer-supporter/calendar.php on line 47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_settings() in wp-content/plugins/prayer-supporter/prayer-supporter.php:34
    • > PHP Warning
      Illegal string offset 'envself' in wp-content/plugins/prayer-supporter/calendar.php on line 33
    • > PHP Warning
      Illegal string offset 'ajax' in wp-content/plugins/prayer-supporter/calendar.php on line 47
    • > PHP Notice
      Uninitialized string offset: 0 in wp-content/plugins/prayer-supporter/calendar.php on line 47
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/prayer-supporter/calendar.php on line 35
    • > PHP Warning
      Cannot assign an empty string to a string offset in wp-content/plugins/prayer-supporter/calendar.php on line 32
    • > PHP Warning
      require_once(Mail.php): failed to open stream: No such file or directory in wp-content/plugins/prayer-supporter/email-function.php on line 14
    • > PHP Warning
      Illegal string offset 'table_name' in wp-content/plugins/prayer-supporter/calendar.php on line 35

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orders
    • > Network (severe)
    wp-admin/images/blue-grad.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

prayer-supporter/prayer-supporter.php 85% from 13 tests

"Prayer Supporter" version 0.5.3 beta...'s main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "0.5.3 beta...")
  • Description: The description should be shorter than 140 characters (currently 296 characters long)

Code Analysis 5% from 3 tests

File types 0% from 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
These items require your attention
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/prayer-supporter/nightly.bat
5,437 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP133991461,882
JavaScript223353071,305
PO File35671,0531,164
CSS14220321,085
DOS Batch1001

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.35
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
35 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/cross.png3.78KB0.61KB▼ 83.82%
css/res/black/black.png0.12KB0.09KB▼ 24.00%
js/jQTreeTable/images/del.png0.65KB0.67KB0.00%
css/calendar/steel/coolbg.png0.48KB0.51KB0.00%
img/ico32x32.png0.68KB1.17KB0.00%