78% bible-reading-plans

Code Review | Bible Reading Plans

WordPress plugin Bible Reading Plans scored78%from 54 tests.

About plugin

  • Plugin page: bible-reading-plans
  • Plugin version: 2.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 22, 2019
  • Latest release: Oct 11, 2023
  • Number of updates: 91
  • Update frequency: every 17.0 days
  • Top authors: drmikegreen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /7,442 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲11.93MB] [CPU: ▲11.65ms] 50% from 4 tests

Analyzing server-side resources used by Bible Reading Plans
The following require your attention
  • RAM: The total memory usage must be kept under 10MB (currently 15.95MB on /wp-admin/options-general.php?page=bible_reading_plans_plugin)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 11.93MB on /wp-admin/options-general.php?page=bible_reading_plans_plugin)
PageMemory (MB)CPU Time (ms)
Home /15.92 ▲12.4658.20 ▲17.52
Dashboard /wp-admin15.95 ▲12.6466.34 ▲12.22
Posts /wp-admin/edit.php15.95 ▲12.5962.39 ▲15.15
Add New Post /wp-admin/post-new.php15.95 ▲10.06109.07 ▲1.70
Media Library /wp-admin/upload.php15.95 ▲12.7161.34 ▲20.12
Bible Reading Plans /wp-admin/options-general.php?page=bible_reading_plans_plugin15.9539.62

Server storage [IO: ▲0.77MB] [DB: ▲6.32MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 62 new options
New WordPress options
brp_dbp_heart-light-ot-and-nt
db_upgraded
brp_abs_back-to-the-bible-chronological
brp_dbp_through-the-bible
brp_esv_heart-light-ot-and-nt
brp_esv_
brp_dbp_one-year-chronological
brp_dbp_pentateuch-and-history-of-israel
brp_dbp_daily-light-on-the-daily-path-morning
brp_esv_chronicles-and-prophets
...

Browser metrics Passed 4 tests

A check of browser resources used by Bible Reading Plans
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲18113.54 ▼0.8612.03 ▲10.1146.85 ▲0.99
Dashboard /wp-admin2,203 ▲355.64 ▲0.03104.91 ▲4.9042.38 ▼1.11
Posts /wp-admin/edit.php2,111 ▲112.02 ▲0.0740.80 ▲2.5231.97 ▼4.20
Add New Post /wp-admin/post-new.php1,603 ▲7722.31 ▼1.28670.43 ▼20.8737.08 ▼18.53
Media Library /wp-admin/upload.php1,408 ▲54.23 ▲0.12107.56 ▼5.4645.95 ▼12.14
Bible Reading Plans /wp-admin/options-general.php?page=bible_reading_plans_plugin1,2642.0246.3272.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 62 options in the database
    • widget_recent-posts
    • brp_dbp_lsb
    • brp_esv_one-year-chronological
    • brp_abs_lsb
    • brp_esv_pentateuch-and-history-of-israel
    • widget_theysaidso_widget
    • brp_abs_through-the-bible
    • brp_abs_bcp19-acna-twoyear
    • brp_dbp_
    • brp_dbp_mcheyne
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bible_reading_plans_plugin
    • > Notice in wp-content/plugins/bible-reading-plans/bible-reading-plans-class.inc.php+1687
    Undefined index: data
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bible_reading_plans_plugin
    • > Warning in wp-content/plugins/bible-reading-plans/bible-reading-plans-class.inc.php+1687
    count(): Parameter must be an array or an object that implements Countable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bible_reading_plans_plugin
    • > Notice in wp-content/plugins/bible-reading-plans/bible-reading-plans-class.inc.php+1802
    Undefined variable: dbp_versions
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bible_reading_plans_plugin
    • > Warning in wp-content/plugins/bible-reading-plans/bible-reading-plans-class.inc.php+1802
    Invalid argument supplied for foreach()
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bible_reading_plans_plugin
    • > Notice in wp-content/plugins/bible-reading-plans/bible-reading-plans-class.inc.php+1805
    Undefined variable: dbp_lang_id2iso_alt
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bible_reading_plans_plugin
    • > Warning in wp-content/plugins/bible-reading-plans/bible-reading-plans-class.inc.php+1805
    array_unique() expects parameter 1 to be array, null given

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 fix the following items
  • 13× 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 __() in wp-content/plugins/bible-reading-plans/includes/properties/book-codes.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bible-reading-plans/includes/properties/dbp.inc.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/bible-reading-plans/includes/properties/poetic-passages.inc.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/bible-reading-plans/includes/properties/miscellaneous.inc.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bible-reading-plans/bible-reading-plans-class.inc.php:104
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/bible-reading-plans/includes/properties/abs.inc.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bible-reading-plans/includes/properties/one-chapter-books.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/bible-reading-plans/includes/properties/short_code_atts.inc.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/bible-reading-plans/includes/properties/esv.inc.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bible-reading-plans/includes/properties/sources.inc.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: daily readings, bible, bible brain, apiesvorg, bible reading plans...

bible-reading-plans/bible-reading-plans.php 92% from 13 tests

The entry point to "Bible Reading Plans" version 2.2.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 960 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin8,186 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP162045435,467
CSS8301641,783
JavaScript1104112511
Markdown13730425

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity426.50
▷ Minimum class complexity415.00
▷ Maximum class complexity438.00
Average method complexity8.09
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods120
▷ Static methods00.00%
▷ Public methods4436.67%
▷ Protected methods7663.33%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.25MB with 0.18MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/cbrp-input-screen.png260.96KB78.51KB▼ 69.91%