72% perelandra-sermons

Code Review | Perelandra Sermons

WordPress plugin Perelandra Sermons scored 72% from 54 tests.

About plugin

  • Plugin page: perelandra-sermons
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.2-4.7.2
  • WordPress version: 5.8.1
  • First release: Feb 20, 2017
  • Latest release: Apr 29, 2017
  • Number of updates: 22
  • Update frequency: every 3.0 days
  • Top authors: perelandrawp (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active / 1,791 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.02MB] [CPU: ▼139.31ms] Passed 4 tests

Analyzing server-side resources used by Perelandra Sermons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.9344.48 ▲10.51
Dashboard /wp-admin4.13 ▲1.0751.93 ▲1.83
Posts /wp-admin/edit.php4.16 ▲1.0651.17 ▲5.23
Add New Post /wp-admin/post-new.php6.81 ▲1.3899.45 ▼574.82
Media Library /wp-admin/upload.php4.01 ▲1.0164.29 ▲30.73
Add New /wp-admin/post-new.php?post_type=perelandra_sermon4.3764.16
All Sermons /wp-admin/edit.php?post_type=perelandra_sermon4.0743.23
Topics /wp-admin/edit-tags.php?taxonomy=perelandra_sermon_topics&post_type=perelandra_sermon4.0139.68
Settings /wp-admin/edit.php?post_type=perelandra_sermon&page=sermon_settings3.9538.80
Speakers /wp-admin/edit-tags.php?taxonomy=perelandra_sermon_speakers&post_type=perelandra_sermon4.0141.11
Books of the Bible /wp-admin/edit-tags.php?taxonomy=perelandra_sermon_books&post_type=perelandra_sermon4.0141.17
Series /wp-admin/edit-tags.php?taxonomy=perelandra_sermon_series&post_type=perelandra_sermon4.2740.07

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 561 new files
Database: no new tables, 2 new options
New WordPress options
pl_sermons_version
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

A check of browser resources used by Perelandra Sermons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,927 ▲33116.74 ▲0.6223.67 ▲11.7144.81 ▼5.46
Dashboard /wp-admin3,045 ▲1146.04 ▼0.12151.01 ▼21.59102.71 ▼6.14
Posts /wp-admin/edit.php2,814 ▲752.74 ▲0.0175.26 ▲7.3594.58 ▲8.03
Add New Post /wp-admin/post-new.php1,634 ▼4917.41 ▼1.12438.13 ▲31.57129.24 ▲20.52
Media Library /wp-admin/upload.php1,882 ▲785.04 ▲0.02169.07 ▲19.54137.24 ▲19.07
Add New /wp-admin/post-new.php?post_type=perelandra_sermon2,3482.3341.1576.80
All Sermons /wp-admin/edit.php?post_type=perelandra_sermon1,5092.6568.2269.23
Topics /wp-admin/edit-tags.php?taxonomy=perelandra_sermon_topics&post_type=perelandra_sermon1,8132.4362.7181.57
Settings /wp-admin/edit.php?post_type=perelandra_sermon&page=sermon_settings1,4433.4382.31109.75
Speakers /wp-admin/edit-tags.php?taxonomy=perelandra_sermon_speakers&post_type=perelandra_sermon1,8162.4368.3076.04
Books of the Bible /wp-admin/edit-tags.php?taxonomy=perelandra_sermon_books&post_type=perelandra_sermon1,8162.4369.4281.97
Series /wp-admin/edit-tags.php?taxonomy=perelandra_sermon_series&post_type=perelandra_sermon1,2332.1234.1270.77

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: 2 options
    • recovery_mode_email_last_sent
    • pl_sermons_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=perelandra_sermon
    • > Compile error in wp-content/plugins/perelandra-sermons/cmb2/includes/types/CMB2_Type_Oembed.php+15
    Declaration of CMB2_Type_Oembed::render() must be compatible with CMB2_Type_Text::render($args = Array)
    • > GET request to /wp-admin/edit.php?post_type=perelandra_sermon&page=sermon_settings
    • > Notice in wp-content/plugins/perelandra-sermons/includes/class-pl-settings.php+375
    Undefined variable: class
    • > GET request to /wp-admin/edit-tags.php?taxonomy=perelandra_sermon_series&post_type=perelandra_sermon
    • > Compile error in wp-content/plugins/perelandra-sermons/cmb2/includes/types/CMB2_Type_File.php+15
    Declaration of CMB2_Type_File::render() must be compatible with CMB2_Type_Text::render($args = Array)

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/perelandra-sermons/templates/loop/wrapper-end.php
    • > /wp-content/plugins/perelandra-sermons/templates/global/wrapper-start.php
    • > /wp-content/plugins/perelandra-sermons/templates/loop/wrapper-start.php
    • > /wp-content/plugins/perelandra-sermons/templates/loop/footer.php
    • > /wp-content/plugins/perelandra-sermons/templates/global/wrapper-end.php
  • 53× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/perelandra-sermons/templates/taxonomy-series.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/perelandra-sermons/cmb2/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pl_get_option() in wp-content/plugins/perelandra-sermons/views/feed.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/perelandra-sermons/templates/loop/header.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/perelandra-sermons/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/perelandra-sermons/cmb2/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/perelandra-sermons/cmb2/includes/types/CMB2_Type_Picker_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/perelandra-sermons/templates/single-sermon/meta.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/perelandra-sermons/cmb2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/perelandra-sermons/cmb2/includes/types/CMB2_Type_File_Base.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
9 plugin tags: sermons, church sermon manager, sermon media, church sermons, church plugin...

perelandra-sermons/perelandra-sermons.php 92% from 13 tests

The main PHP script in "Perelandra Sermons" version 1.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin68,790 lines of code in 394 files:
LanguageFilesBlank linesComment linesLines of code
PO File12415,20419,32135,195
PHP1655,74613,47422,482
CSS271,2331,1035,631
Sass285051072,787
JavaScript122873271,190
Markdown92480716
SVG22022597
JSON40090
HTML17074
YAML22028

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,019)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity25.44
▷ Minimum class complexity1.00
▷ Maximum class complexity1,019.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes106
▷ Abstract classes109.43%
▷ Concrete classes9690.57%
▷ Final classes00.00%
Methods1,145
▷ Static methods16013.97%
▷ Public methods89978.52%
▷ Protected methods806.99%
▷ Private methods16614.50%
Functions125
▷ Named functions125100.00%
▷ Anonymous functions00.00%
Constants106
▷ Global constants8378.30%
▷ Class constants2321.70%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
22 compressed PNG files occupy 0.44MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%