78% sermon-manager-import

Code Review | Sermon Manager Import

WordPress plugin Sermon Manager Import scored 78% from 54 tests.

About plugin

  • Plugin page: sermon-manager-im...
  • Plugin version: 0.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9.5
  • WordPress version: 5.8.1
  • First release: Oct 23, 2013
  • Latest release: Mar 29, 2019
  • Number of updates: 25
  • Update frequency: every 80.0 days
  • Top authors: khornberg (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active / 4,955 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.54MB] [CPU: ▼187.77ms] Passed 4 tests

An overview of server-side resources used by Sermon Manager Import
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼0.756.83 ▼29.25
Dashboard /wp-admin2.11 ▼0.958.03 ▼35.71
Posts /wp-admin/edit.php2.11 ▼1.008.36 ▼37.90
Add New Post /wp-admin/post-new.php2.11 ▼3.337.06 ▼648.21
Media Library /wp-admin/upload.php2.11 ▼0.898.06 ▼26.72
Import Settings /wp-admin/plugins.php?page=sermon-manager-import-options2.116.66
Import Sermons /wp-admin/plugins.php?page=sermon-manager-import2.117.75

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 160 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Sermon Manager Import: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,720 ▲12415.94 ▲0.439.08 ▼2.0645.40 ▼0.71
Dashboard /wp-admin2,977 ▲435.91 ▼0.11139.83 ▼16.28108.86 ▼3.64
Posts /wp-admin/edit.php2,756 ▲172.72 ▲0.0166.73 ▲0.1385.24 ▼3.01
Add New Post /wp-admin/post-new.php1,683 ▼2,00418.68 ▲3.54399.44 ▼129.64109.41 ▲0.80
Media Library /wp-admin/upload.php1,824 ▲145.00 ▼0.05150.47 ▼1.05122.10 ▼9.93
Import Settings /wp-admin/plugins.php?page=sermon-manager-import-options1,6002.1058.5786.48
Import Sermons /wp-admin/plugins.php?page=sermon-manager-import1,1342.3852.3058.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/sermon-manager-import/class-sermon-manager-import.php+945
    Trying to access array offset on value of type bool

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=sermon-manager-import
    • > Notice in wp-content/plugins/sermon-manager-import/class-sermon-manager-import.php+945
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/plugins.php?page=sermon-manager-import-options
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/plugins.php?page=sermon-manager-import-options
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=sermon-manager-import-options
    • > Notice in wp-content/plugins/sermon-manager-import/views/options.php+390
    Trying to get property 'name' of non-object

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
The following issues need your attention
  • 126× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/sermon-manager-import/views/options.php:400
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/sermon-manager-import/assets/getid3/module.graphic.png.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_lib' not found in wp-content/plugins/sermon-manager-import/trunk/assets/getid3/module.audio.la.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_lib' not found in wp-content/plugins/sermon-manager-import/assets/getid3/module.audio.ogg.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/sermon-manager-import/assets/getid3/module.misc.par2.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/sermon-manager-import/assets/getid3/module.audio.rkau.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_lib' not found in wp-content/plugins/sermon-manager-import/assets/getid3/module.audio.lpac.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/sermon-manager-import/assets/getid3/module.audio.au.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/sermon-manager-import/assets/getid3/module.audio.wavpack.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/sermon-manager-import/assets/getid3/module.audio-video.flv.php:76

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: sermon manager, podcast, mp3, podcasting, sermon...

sermon-manager-import/sermon-manager-import.php 92% from 13 tests

The primary PHP file in "Sermon Manager Import" version 0.2.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 163 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin24,622 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
PHP714,7627,40624,566
CSS18033
JavaScript142623

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 392)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity69.06
▷ Minimum class complexity1.00
▷ Maximum class complexity543.00
Average method complexity9.80
▷ Minimum method complexity1.00
▷ Maximum method complexity392.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes142
▷ Abstract classes21.41%
▷ Concrete classes14098.59%
▷ Final classes00.00%
Methods1,094
▷ Static methods39636.20%
▷ Public methods1,02493.60%
▷ Protected methods161.46%
▷ Private methods544.94%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants474
▷ Global constants43892.41%
▷ Class constants367.59%
▷ Public constants36100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.29MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/screenshot-1.png75.15KB28.16KB▼ 62.53%
trunk/screenshot-2.png7.91KB4.06KB▼ 48.70%
screenshot-2.png7.91KB4.06KB▼ 48.70%
trunk/screenshot-3.png64.33KB28.56KB▼ 55.60%
screenshot-1.png75.15KB28.16KB▼ 62.53%