78% church-social

Code Review | Church Social

WordPress plugin Church Social scored78%from 54 tests.

About plugin

  • Plugin page: church-social
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 31, 2016
  • Latest release: Jul 27, 2023
  • Number of updates: 29
  • Update frequency: every 92.2 days
  • Top authors: reinink (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,777 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼11.13ms] Passed 4 tests

This is a short check of server-side resources used by Church Social
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.36 ▼3.28
Dashboard /wp-admin3.44 ▲0.0945.40 ▼16.10
Posts /wp-admin/edit.php3.55 ▲0.1944.17 ▼2.51
Add New Post /wp-admin/post-new.php6.02 ▲0.1382.25 ▼22.61
Media Library /wp-admin/upload.php3.36 ▲0.1334.29 ▼0.23
Church Social /wp-admin/options-general.php?page=church_social3.3633.05

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 13 new options
New WordPress options
widget_church_social_recent_sermons
db_upgraded
widget_recent-posts
church_social_sermon_copyright_notice
church_social_calendar_page_id
theysaidso_admin_options
widget_theysaidso_widget
widget_church_social_upcoming_events
church_social_api_key
church_social_theme
...

Browser metrics Passed 4 tests

Church Social: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.23 ▼0.391.57 ▼0.3138.07 ▼2.89
Dashboard /wp-admin2,202 ▲275.62 ▼0.1583.69 ▼16.2538.65 ▼5.77
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0332.73 ▼1.5233.87 ▼2.66
Add New Post /wp-admin/post-new.php1,540 ▲1223.17 ▲0.06641.85 ▼6.2651.94 ▼2.66
Media Library /wp-admin/upload.php1,401 ▲14.22 ▲0.0396.49 ▼0.9741.93 ▲0.30
Church Social /wp-admin/options-general.php?page=church_social9421.9923.0427.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_church_social_recent_sermons
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_church_social_upcoming_events

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/church-social/views/recent_sermons.php
    • > /wp-content/plugins/church-social/views/upcoming_events.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/church-social/views/calendar.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/church-social/libs/UpcomingEventsWidget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/church-social/libs/RecentSermonsWidget.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/church-social/views/event.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/church-social/views/admin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/church-social/libs/UpcomingEventsWidget.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/church-social/views/sermon.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/church-social/views/sermons.php:3

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: events, church, sermons, calendar

church-social/church_social.php 92% from 13 tests

The primary PHP file in "Church Social" version 1.5.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("church-social.php" instead of "church_social.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin12,497 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JSON20011,537
PHP1514711843
Sass4650108
JavaScript1207
CSS2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity9.43
▷ Minimum class complexity2.00
▷ Maximum class complexity22.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2790.00%
▷ Protected methods310.00%
▷ Private methods00.00%
Functions9
▷ Named functions00.00%
▷ Anonymous functions9100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin