78% display-sermonnet

Code Review | sermon.net display

WordPress plugin sermon.net display scored78%from 54 tests.

About plugin

  • Plugin page: display-sermonnet
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5
  • WordPress version: 6.3.1
  • First release: Nov 22, 2016
  • Latest release: Aug 21, 2020
  • Number of updates: 31
  • Update frequency: every 44.1 days
  • Top authors: mgyura (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /0 total downloads

Benchmarks

Plugin footprint 82% 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.01MB] [CPU: ▼7.64ms] 75% from 4 tests

A check of server-side resources used by sermon.net display
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 944.14ms on /wp-admin/options-general.php?page=wt-sermonnet-settings)
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.83 ▼5.02
Dashboard /wp-admin3.33 ▼0.0252.23 ▼14.11
Posts /wp-admin/edit.php3.38 ▲0.0247.94 ▼2.70
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.91 ▼8.71
Media Library /wp-admin/upload.php3.25 ▲0.0237.92 ▲4.22
sermon.net settings /wp-admin/options-general.php?page=wt-sermonnet-settings3.22944.14

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_wtsermonnet_widget

Browser metrics Passed 4 tests

Checking browser requirements for sermon.net display
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.27 ▼0.112.10 ▲0.3741.03 ▼1.55
Dashboard /wp-admin2,207 ▲305.59 ▼0.0285.64 ▼5.5239.18 ▼0.26
Posts /wp-admin/edit.php2,118 ▲182.12 ▲0.0938.17 ▲1.8934.38 ▼2.44
Add New Post /wp-admin/post-new.php6,383 ▲4,85127.89 ▲4.50922.82 ▲228.3240.25 ▼16.71
Media Library /wp-admin/upload.php1,412 ▲124.27 ▲0.05103.07 ▼5.7042.62 ▼6.47
sermon.net settings /wp-admin/options-general.php?page=wt-sermonnet-settings8612.1934.0337.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_wtsermonnet_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wt-sermonnet-settings
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% 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
Please fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/display-sermonnet/includes/process-feed.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/display-sermonnet/includes/process-feed.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-sermonnet/includes/widgets.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-sermonnet/includes/options.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-sermonnet/includes/gb-live-shortcodes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/display-sermonnet/includes/shortcodes.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-sermonnet/includes/block-shortcodes.php:6

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

display-sermonnet/wt-sermonnet.php 92% from 13 tests

"sermon.net display" version 1.4.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("display-sermonnet.php" instead of "wt-sermonnet.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
Good job! No executable or dangerous file extensions detected1,339 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP9171831,202
JavaScript21815129
CSS1108

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity13.75
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/icon_view1x.png1.47KB1.29KB▼ 11.86%
includes/images/icon_download1x.png0.73KB0.50KB▼ 31.55%