47% church-admin

Code Review | Church Admin

WordPress plugin Church Admin scored47%from 54 tests.

About plugin

  • Plugin page: church-admin
  • Plugin version: 4.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 31, 2011
  • Latest release: Dec 3, 2023
  • Number of updates: 1,516
  • Update frequency: every 3.1 days
  • Top authors: andy_moyle (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

1,000+ active /370,199 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.41MB] [CPU: ▲2.74ms] Passed 4 tests

A check of server-side resources used by Church Admin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4744.54 ▲4.83
Dashboard /wp-admin3.67 ▲0.3749.22 ▲0.23
Posts /wp-admin/edit.php3.79 ▲0.4353.72 ▲7.74
Add New Post /wp-admin/post-new.php6.48 ▲0.6093.91 ▲1.28
Media Library /wp-admin/upload.php3.60 ▲0.3741.27 ▲4.61
Add New /wp-admin/post-new.php?post_type=prayer-requests3.8155.77
All Bible Readings /wp-admin/edit.php?post_type=bible-readings3.6442.11
Add New /wp-admin/post-new.php?post_type=bible-readings6.4891.21
All Prayer Requests /wp-admin/edit.php?post_type=prayer-requests3.6446.28

Server storage [IO: ▲11.05MB] [DB: ▲0.09MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 965 new files
Database: 53 new tables, 41 new options
New tables
wp_church_admin_unit_meta
wp_church_admin_individual_attendance
wp_church_admin_contact_form
wp_church_admin_events
wp_church_admin_session_meta
wp_church_admin_people_meta
wp_church_admin_sermon_files
wp_church_admin_attendance
wp_church_admin_safeguarding
wp_church_admin_ministries
...
New WordPress options
church_admin_gender
church_admin_app_new_menu
church_admin_app_people_types
church_admin_trial
church_admin_contact_form_settings
church_admin_plugin_error
church_admin_marital_status
church_admin_app_menu_title
church_admin_licence_checked
church_admin_modified_app_content
...

Browser metrics Passed 4 tests

Checking browser requirements for Church Admin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,074 ▲31213.47 ▼0.899.39 ▲7.5943.02 ▼0.57
Dashboard /wp-admin2,330 ▲1495.67 ▼0.0696.57 ▼2.1343.18 ▲2.94
Posts /wp-admin/edit.php2,231 ▲1312.03 ▲0.0940.71 ▲2.4135.00 ▲1.90
Add New Post /wp-admin/post-new.php6,340 ▲4,81418.94 ▼4.56887.78 ▲258.6740.67 ▼8.03
Media Library /wp-admin/upload.php1,606 ▲2094.44 ▲0.2596.84 ▲2.3542.37 ▲0.93
Add New /wp-admin/post-new.php?post_type=prayer-requests2,5067.64198.8567.39
All Bible Readings /wp-admin/edit.php?post_type=bible-readings1,2621.9637.7930.82
Add New /wp-admin/post-new.php?post_type=bible-readings1,65016.91899.2135.34
All Prayer Requests /wp-admin/edit.php?post_type=prayer-requests1,2382.0239.8331.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function wp_clear_scheduled_hook was called with an argument that is deprecated since version 3.0.0! This argument has changed to an array to match the behavior of the other cron functions.
  • This plugin does not fully uninstall, leaving 53 tables in the database
    • wp_church_admin_unit_meta
    • wp_church_admin_email
    • wp_church_admin_facilities_bookings
    • wp_church_admin_my_prayer
    • wp_church_admin_ministries
    • wp_church_admin_event_payments
    • wp_church_admin_giving_meta
    • wp_church_admin_comments
    • wp_church_admin_automations
    • wp_church_admin_pastoral_visits
    • ...
  • This plugin does not fully uninstall, leaving 41 options in the database
    • db_upgraded
    • church_admin_marital_status
    • church_admin_app_groups
    • widget_church_admin_calendar_widget
    • church_admin_giving_funds
    • church_admin_confirm_email_template
    • church_admin_people_type
    • widget_ca_prayer_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • ...

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 67× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/church-admin/display/calendar-list.php
    • > /wp-content/plugins/church-admin/includes/pledges.php
    • > /wp-content/plugins/church-admin/includes/rota.new.php
    • > /wp-content/plugins/church-admin/includes/filter.php
    • > /wp-content/plugins/church-admin/includes/hope-team.php
    • > /wp-content/plugins/church-admin/includes/events.php
    • > /wp-content/plugins/church-admin/display/calendar.new.php
    • > /wp-content/plugins/church-admin/display/classes.php
    • > /wp-content/plugins/church-admin/includes/recent.php
    • > /wp-content/plugins/church-admin/includes/sites.php
  • 249× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/church-admin/stripe/vendor/stripe/stripe-php/lib/Identity/VerificationSession.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/church-admin/stripe/vendor/stripe/stripe-php/lib/Service/OAuthService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/church-admin/stripe/vendor/stripe/stripe-php/lib/ApplePayDomain.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/church-admin/stripe/vendor/stripe/stripe-php/lib/Service/SourceService.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Stripe\\HttpClient\\ClientInterface' not found in wp-content/plugins/church-admin/stripe/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/church-admin/stripe/vendor/stripe/stripe-php/lib/FundingInstructions.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\InvalidRequestException' not found in wp-content/plugins/church-admin/stripe/vendor/stripe/stripe-php/lib/Exception/RateLimitException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/church-admin/stripe/vendor/stripe/stripe-php/lib/Service/Reporting/ReportRunService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/church-admin/stripe/vendor/stripe/stripe-php/lib/PaymentLink.php:48
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/church-admin/stripe/vendor/stripe/stripe-php/lib/Service/PlanService.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
  • Screenshots: Add a description for screenshot #5 in church-admin/assets to your readme.txt
Please take inspiration from this readme.txt

church-admin/index.php 92% from 13 tests

This is the main PHP file of "Church Admin" version 4.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("church-admin.php" instead of "index.php")

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
Please make sure to remedy the following
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/church-admin/stripe/vendor/stripe/stripe-php/data/ca-certificates.crt
    • .bat - Batch File in Windows
      • wp-content/plugins/church-admin/includes/phpqrcode/tools/merge.bat
89,841 lines of code in 476 files:
LanguageFilesBlank linesComment linesLines of code
PHP43614,07022,93882,746
JavaScript205541,0043,621
CSS51781581,611
Markdown378001,482
SVG300126
JSON300123
HTML18564
XML10031
make110029
INI1004
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.39
▷ Minimum class complexity1.00
▷ Maximum class complexity435.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces37
Interfaces9
Traits9
Classes311
▷ Abstract classes103.22%
▷ Concrete classes30196.78%
▷ Final classes00.00%
Methods1,506
▷ Static methods31821.12%
▷ Public methods1,26884.20%
▷ Protected methods17911.89%
▷ Private methods593.92%
Functions971
▷ Named functions94196.91%
▷ Anonymous functions303.09%
Constants1,183
▷ Global constants18115.30%
▷ Class constants1,00284.70%
▷ Public constants1,002100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
76 PNG files occupy 1.20MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/amazon-podcast.png8.00KB2.84KB▼ 64.46%
includes/phpqrcode/cache/frame_36.png0.27KB0.25KB▼ 7.72%
css/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
includes/phpqrcode/cache/frame_11.png0.20KB0.19KB▼ 6.83%
css/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%