79% church-options

Code Review | Church Options

WordPress plugin Church Options scored79%from 54 tests.

About plugin

  • Plugin page: church-options
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Jan 31, 2019
  • Latest release: Oct 27, 2019
  • Number of updates: 8
  • Update frequency: every 33.7 days
  • Top authors: quixoticstudios (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /828 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
Installer ran successfully

Server metrics [RAM: ▲1.50MB] [CPU: ▲1.94ms] Passed 4 tests

Server-side resources used by Church Options
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.82 ▲1.3549.92 ▲8.20
Dashboard /wp-admin4.84 ▲1.5355.71 ▲5.23
Posts /wp-admin/edit.php4.95 ▲1.5953.95 ▲4.78
Add New Post /wp-admin/post-new.php7.48 ▲1.5993.96 ▼10.44
Media Library /wp-admin/upload.php4.77 ▲1.5449.14 ▲16.43
Plugin Settings /wp-admin/admin.php?page=church_options_admin_page4.7246.05
Dashboard /wp-admin/admin.php?page=church_options_dashboard_admin_page4.7035.56

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 162 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Church Options
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲19913.59 ▼0.806.18 ▲4.1336.98 ▼7.27
Dashboard /wp-admin2,240 ▲525.83 ▲0.93102.09 ▼15.9737.22 ▼5.80
Posts /wp-admin/edit.php2,125 ▲332.03 ▲0.0238.47 ▲3.2037.64 ▲3.80
Add New Post /wp-admin/post-new.php6,835 ▲5,30229.19 ▲5.99967.41 ▲295.7639.14 ▼14.99
Media Library /wp-admin/upload.php1,428 ▲404.29 ▲0.06108.38 ▲1.0775.43 ▲28.60
Plugin Settings /wp-admin/admin.php?page=church_options_admin_page9002.1829.3329.92
Dashboard /wp-admin/admin.php?page=church_options_dashboard_admin_page1,0302.0726.9927.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=church_options_dashboard_admin_page
    • > Notice in wp-content/plugins/church-options/church-options.php+349
    Undefined property: stdClass::$publish
    • > GET request to /wp-admin/admin.php?page=church_options_dashboard_admin_page
    • > Notice in wp-content/plugins/church-options/church-options.php+482
    Undefined variable: output

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 take a closer look at the following
  • 48× 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 add_action() in wp-content/plugins/church-options/lib/advanced-custom-fields/core/controllers/upgrade.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/church-options/lib/advanced-custom-fields/core/fields/tab.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/church-options/lib/advanced-custom-fields/core/fields/number.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/church-options/cpt/church-people.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/church-options/lib/advanced-custom-fields/core/fields/dummy.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/church-options/lib/advanced-custom-fields/core/fields/page_link.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/church-options/lib/advanced-custom-fields/core/controllers/revisions.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/church-options/lib/advanced-custom-fields/core/api.php:866
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/church-options/lib/advanced-custom-fields/core/fields/select.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/church-options/cpt/church-verses.php:36

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 Passed 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
9 plugin tags: ministries, announcements, custom fields, church, sermons...

church-options/church-options.php Passed 13 tests

The principal PHP file in "Church Options" v. 1.0.3 is loaded by WordPress automatically on each request
118 characters long description:
An all-in-one solution for churches to add the custom post types and custom fields they need for an effective website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected42,015 lines of code in 98 files:
LanguageFilesBlank linesComment linesLines of code
PO File2911,94318,31224,892
PHP514,2044,83710,347
JavaScript102,1671,6714,210
CSS87013942,566

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity23.93
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes40
▷ Abstract classes00.00%
▷ Concrete classes40100.00%
▷ Final classes00.00%
Methods282
▷ Static methods00.00%
▷ Public methods282100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions73
▷ Named functions7298.63%
▷ Anonymous functions11.37%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
19 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/advanced-custom-fields/core/fields/date_picker/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
lib/advanced-custom-fields/images/sprite@2x.png12.53KB4.91KB▼ 60.81%
lib/advanced-custom-fields/core/fields/date_picker/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
lib/advanced-custom-fields/core/fields/date_picker/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
lib/advanced-custom-fields/images/arrows@2x.png0.84KB0.88KB0.00%