10% wp-church-donation

Code Review | WP Church Donation

WordPress plugin WP Church Donation scored10%from 54 tests.

About plugin

  • Plugin page: wp-church-donation
  • Plugin version: 1.6
  • PHP compatiblity: 5.5.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2.1
  • WordPress version: 6.3.1
  • First release: Jan 16, 2015
  • Latest release: May 27, 2019
  • Number of updates: 33
  • Update frequency: every 48.3 days
  • Top authors: ashishajani (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active /6,239 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/wp-church-donation/wp-church-donation.php+19
    Only variables should be passed by reference

Server metrics [RAM: ▼1.92MB] [CPU: ▼57.84ms] Passed 4 tests

This is a short check of server-side resources used by WP Church Donation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.395.74 ▼37.10
Dashboard /wp-admin2.10 ▼1.256.55 ▼57.83
Posts /wp-admin/edit.php2.10 ▼1.268.61 ▼35.96
Add New Post /wp-admin/post-new.php2.10 ▼3.795.44 ▼100.46
Media Library /wp-admin/upload.php2.10 ▼1.135.38 ▼34.34
Content /wp-admin/admin.php?page=wp_church_donation_options2.106.04
Church Donation /wp-admin/admin.php?page=wp_church_donation2.107.52
Auth.Net Settings /wp-admin/admin.php?page=wp_church_donation_settings_authorize2.105.11

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: 3 new tables, 7 new options
New tables
wp_church_donation_content
wp_church_donation
wp_church_donation_settings
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
church_donation_db_version
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP Church Donation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲14613.54 ▼0.847.91 ▲5.6044.89 ▲1.10
Dashboard /wp-admin2,234 ▲545.66 ▲0.0686.15 ▼22.8737.70 ▼8.20
Posts /wp-admin/edit.php2,142 ▲392.25 ▲0.1939.28 ▼0.8835.04 ▼1.94
Add New Post /wp-admin/post-new.php1,556 ▲2323.62 ▲0.42714.89 ▲40.9350.60 ▼13.29
Media Library /wp-admin/upload.php1,439 ▲454.29 ▲0.0898.15 ▼3.9045.44 ▲1.87
Content /wp-admin/admin.php?page=wp_church_donation_options9351.8127.2533.45
Church Donation /wp-admin/admin.php?page=wp_church_donation8291.8625.4126.67
Auth.Net Settings /wp-admin/admin.php?page=wp_church_donation_settings_authorize8731.8628.2528.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-church-donation/wp-church-donation.php+19
    Only variables should be passed by reference
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_church_donation_content
    • wp_church_donation
    • wp_church_donation_settings
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • church_donation_db_version
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% 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)
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_church_donation_settings_authorize
    • > Notice in wp-content/plugins/wp-church-donation/wp-church-donation.php+19
    Only variables should be passed by reference
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_church_donation_settings_authorize
    • > Deprecated in wp-content/plugins/wp-church-donation/includes/church-donation-functions.php+218
    Array and string offset access syntax with curly braces is deprecated

SRP 50% 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 fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-church-donation/wp-church-donation.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please a description for screenshot #7 in wp-church-donation/assets to your readme.txt
  • Tags: Please delete some tags, you are using 21 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-church-donation/wp-church-donation.php 92% from 13 tests

The primary PHP file in "WP Church Donation" version 1.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 184 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected2,667 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP61641271,514
JavaScript21531291,076
CSS26677

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin