68% wp-prayer

Code Review | WP Prayer

WordPress plugin WP Prayer scored68%from 54 tests.

About plugin

  • Plugin page: wp-prayer
  • Plugin version: 2.0.8
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 15, 2016
  • Latest release: Nov 5, 2023
  • Number of updates: 324
  • Update frequency: every 8.7 days
  • Top authors: abrg (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /61,049 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.67MB] [CPU: ▲1.49ms] Passed 4 tests

This is a short check of server-side resources used by WP Prayer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.12 ▲0.6544.39 ▲9.60
Dashboard /wp-admin3.98 ▲0.6848.56 ▼2.16
Posts /wp-admin/edit.php4.03 ▲0.6752.08 ▲2.63
Add New Post /wp-admin/post-new.php6.56 ▲0.6887.76 ▼2.94
Media Library /wp-admin/upload.php3.90 ▲0.6742.49 ▲8.42

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 60 new files
Database: 3 new tables, 6 new options
New tables
wp_prayer_comment
wp_prayer_users
wp_prayer_engine
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Prayer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲19313.33 ▼0.868.73 ▲7.0243.63 ▲5.31
Dashboard /wp-admin2,256 ▲765.63 ▼0.0190.64 ▼7.1937.85 ▼0.00
Posts /wp-admin/edit.php2,158 ▲582.00 ▲0.0540.91 ▲0.5836.09 ▼2.77
Add New Post /wp-admin/post-new.php1,573 ▲4723.56 ▲0.35657.43 ▲17.7750.98 ▼3.74
Media Library /wp-admin/upload.php1,452 ▲554.33 ▲0.2098.51 ▼2.7043.55 ▲1.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_prayer_engine
    • wp_prayer_users
    • wp_prayer_comment
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-prayer/wp-prayer-engine.php
    • > /wp-content/plugins/wp-prayer/core/captcha.php
    • > /wp-content/plugins/wp-prayer/comment.php
    • > /wp-content/plugins/wp-prayer/modules/export/views/prayers.php
    • > /wp-content/plugins/wp-prayer/modules/shortcode/views/ajax_response.php
  • 31× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-prayer/modules/email_settings/views/manage.php:70
    • > PHP Fatal error
      Uncaught Error: Class 'AbstractFactoryFlipperCode' not found in wp-content/plugins/wp-prayer/core/class.controller-factory.php:15
    • > PHP Notice
      Undefined variable: export_table_records in wp-content/plugins/wp-prayer/modules/export/prayers_export_pdf.php on line 77
    • > PHP Fatal error
      Uncaught Error: Class 'FlipperCode_WPE_Model_Base' not found in wp-content/plugins/wp-prayer/modules/settings/model.settings.php:14
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-prayer/core/class.tabular.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-prayer/modules/shortcode/views/wp-prayer-engine-form.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'FlipperCode_WPE_Model_Base' not found in wp-content/plugins/wp-prayer/modules/email_settings/model.email_settings.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'FactoryModelWPE' not found in wp-content/plugins/wp-prayer/modules/shortcode/views/wp-prayer-praise.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'FlipperCode_WPE_Model_Base' not found in wp-content/plugins/wp-prayer/modules/export/model.export.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'FlipperCode_WPE_Model_Base' not found in wp-content/plugins/wp-prayer/modules/overview/model.overview.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: prayer, ministry, pray, bible, church

wp-prayer/wp-prayer-engine.php 92% from 13 tests

Analyzing the main PHP file in "WP Prayer" version 2.0.8
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-prayer.php" instead of "wp-prayer-engine.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin6,778 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP363,1771,7246,372
CSS31869269
JavaScript3201475
SVG54062

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 122)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity47.86
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity5.73
▷ Minimum method complexity1.00
▷ Maximum method complexity122.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes14.55%
▷ Concrete classes2195.45%
▷ Final classes00.00%
Methods219
▷ Static methods4219.18%
▷ Public methods18885.84%
▷ Protected methods2310.50%
▷ Private methods83.65%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants20
▷ Global constants1890.00%
▷ Class constants210.00%
▷ Public constants2100.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
There are no PNG files in this plugin