72% k7-church

Code Review | K7 Church

WordPress plugin K7 Church scored72%from 54 tests.

About plugin

  • Plugin page: k7-church
  • Plugin version: 1.0.21
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.2.4
  • WordPress version: 6.3.1
  • First release: Sep 23, 2018
  • Latest release: Oct 18, 2019
  • Number of updates: 250
  • Update frequency: every 1.6 days
  • Top authors: Marcio Zebedeu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,238 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.94MB] [CPU: ▲4.60ms] Passed 4 tests

Server-side resources used by K7 Church
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.38 ▲0.9146.82 ▲4.79
Dashboard /wp-admin4.29 ▲0.9956.69 ▲8.46
Posts /wp-admin/edit.php4.36 ▲1.0064.46 ▲14.78
Add New Post /wp-admin/post-new.php6.82 ▲0.9388.88 ▼2.93
Media Library /wp-admin/upload.php4.14 ▲0.9141.91 ▲8.08
Add new /wp-admin/post-new.php?post_type=event4.2651.68
Settings /wp-admin/edit.php?post_type=event&page=event_settings4.1540.85
All events /wp-admin/edit.php?post_type=event4.2244.12
Add New /wp-admin/post-new.php?post_type=sermon4.2851.83
All Sermons /wp-admin/edit.php?post_type=sermon4.2245.19

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 287 new files
Database: no new tables, 10 new options
New WordPress options
church_plugin_tax
theysaidso_admin_options
widget_church_location_widget
can_compress_scripts
church_plugin_cpt
widget_recent-posts
widget_recent-comments
church_plugin
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for K7 Church
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,046 ▲28915.39 ▲1.012.11 ▲0.1145.53 ▼5.30
Dashboard /wp-admin2,445 ▲2577.03 ▲1.13148.63 ▲29.1243.63 ▼0.14
Posts /wp-admin/edit.php2,359 ▲2673.56 ▲1.5461.41 ▲22.2042.95 ▲8.88
Add New Post /wp-admin/post-new.php1,597 ▲6423.40 ▲0.09709.57 ▲0.8740.86 ▼12.76
Media Library /wp-admin/upload.php1,495 ▲1104.76 ▲0.5988.87 ▼11.5544.18 ▲2.75
Add new /wp-admin/post-new.php?post_type=event2,6547.68187.2971.67
Settings /wp-admin/edit.php?post_type=event&page=event_settings1,2513.6448.0724.02
All events /wp-admin/edit.php?post_type=event1,3293.5854.5730.24
Add New /wp-admin/post-new.php?post_type=sermon2,5587.62168.8662.59
All Sermons /wp-admin/edit.php?post_type=sermon1,3663.6153.6930.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_recent-posts
    • db_upgraded
    • church_plugin
    • church_plugin_cpt
    • widget_church_location_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • church_plugin_tax

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/k7-church/assets/js/fullcalendar-4.3.1/examples/php/get-events.php
    • > /wp-content/plugins/k7-church/assets/js/fullcalendar-4.3.1/examples/php/get-time-zones.php
    • > /wp-content/plugins/k7-church/templates/email.php
    • > /wp-content/plugins/k7-church/church-plugin.php
  • 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/k7-church/templates/register.php on line 6
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/k7-church/templates/register.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/k7-church/page-templates/location-template.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Church_BaseController' not found in wp-content/plugins/k7-church/inc/controller/Church_ParticipantController.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Church_BaseController' not found in wp-content/plugins/k7-church/inc/api/callbacks/Church_SermonCallbacks.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/k7-church/templates/auth.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/k7-church/templates/admin/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/k7-church/templates/participe-form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/k7-church/templates/cpt.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/k7-church/templates/taxonomy.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sermon
    • > Network (severe)
    wp-content/plugins/k7-church/node_modules/code-prettify/styles/desert.css - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: testimonial, media widget, locations, form, register...

k7-church/church-plugin.php 92% from 13 tests

Analyzing the main PHP file in "K7 Church" version 1.0.21
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("k7-church.php" instead of "church-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin45,776 lines of code in 260 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1121,0293,53232,898
PHP601,3007985,024
TypeScript11125373,534
HTML1622101,691
CSS163643081,656
JSON1200424
Sass8460309
SVG1103169
Markdown1351056
XML10015

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.48
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes42
▷ Abstract classes00.00%
▷ Concrete classes42100.00%
▷ Final classes37.14%
Methods219
▷ Static methods104.57%
▷ Public methods20995.43%
▷ Protected methods00.00%
▷ Private methods104.57%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon/Google_Calendar_icon-icons.com_75710.png5.97KB3.17KB▼ 46.91%
assets/images/no-image-available-icon-6.png17.14KB7.95KB▼ 53.65%