74% ehw-random-bible-verse

Code Review | Random Bible Verse Widget

WordPress plugin Random Bible Verse Widget scored74%from 54 tests.

About plugin

  • Plugin page: ehw-random-bible-...
  • Plugin version: 0.1.2
  • PHP compatiblity: 7.4.26+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-5.9
  • WordPress version: 6.3.1
  • First release: Feb 18, 2022
  • Latest release: Feb 18, 2022
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: codeslayer2010 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /220 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.70MB] [CPU: ▼50.60ms] Passed 4 tests

Analyzing server-side resources used by Random Bible Verse Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.169.06 ▼29.98
Dashboard /wp-admin2.31 ▼1.0311.51 ▼52.77
Posts /wp-admin/edit.php2.32 ▼1.0417.14 ▼25.48
Add New Post /wp-admin/post-new.php2.31 ▼3.5712.21 ▼94.18
Media Library /wp-admin/upload.php2.31 ▼0.919.41 ▼24.57

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Random Bible Verse Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.45 ▼0.946.54 ▲4.7936.35 ▼7.39
Dashboard /wp-admin2,203 ▲155.84 ▼0.0693.93 ▼13.9237.94 ▼11.47
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0141.09 ▲6.7434.39 ▲2.16
Add New Post /wp-admin/post-new.php1,519 ▲523.50 ▲5.77648.23 ▲40.2152.40 ▲2.04
Media Library /wp-admin/upload.php1,391 ▲34.23 ▼0.0095.62 ▼6.3441.39 ▼0.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/ehw-random-bible-verse/includes/ehw-randverse.class.php+13
    Undefined variable: textdomain
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget__widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/ehw-random-bible-verse/includes/ehw-randverse_tmpl__out.php:132
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ehw-random-bible-verse/includes/ehw-randverse.class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ehw-random-bible-verse/includes/ehw-randverse-scripts.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: No valid plugin tags found
The official readme.txt might help

ehw-random-bible-verse/ehw-randverse.php 92% from 13 tests

"Random Bible Verse Widget" version 0.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ehw-random-bible-verse.php" instead of "ehw-randverse.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin176 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP461111162
CSS11013
JavaScript1011

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.21
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin