90% genesis-widget-background

Code Review | Genesis Widget Background

WordPress plugin Genesis Widget Background scored 90% from 54 tests.

About plugin

  • Plugin page: genesis-widget-ba...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.2.2
  • WordPress version: 5.9.2
  • First release: Jan 15, 2015
  • Latest release: Jun 20, 2019
  • Number of updates: 27
  • Update frequency: every 60.1 days
  • Top authors: frankschrijvers (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 6,784 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼294.17ms] Passed 4 tests

This is a short check of server-side resources used by Genesis Widget Background
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.5155.67 ▲32.60
Dashboard /wp-admin3.49 ▲0.0833.05 ▼0.83
Posts /wp-admin/edit.php3.72 ▲0.0838.99 ▲1.29
Add New Post /wp-admin/post-new.php6.96 ▼0.0097.77 ▼1,171.83
Media Library /wp-admin/upload.php3.37 ▲0.0723.85 ▼5.30

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options
widget_genesis-widget-background

Browser metrics Passed 4 tests

An overview of browser requirements for Genesis Widget Background
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,765 ▲2116.20 ▲0.536.25 ▲0.492.34 ▼0.08
Dashboard /wp-admin2,895 ▲346.15 ▼0.02119.78 ▼15.73155.53 ▼5.97
Posts /wp-admin/edit.php2,694 ▼03.25 ▲0.0162.00 ▼1.54140.20 ▼4.83
Add New Post /wp-admin/post-new.php1,661 ▼9115.98 ▼5.78386.26 ▼81.94154.43 ▼3.16
Media Library /wp-admin/upload.php1,698 ▼05.51 ▼0.01145.62 ▲6.18185.28 ▼3.93

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_genesis-widget-background

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (screenshot-1.jpg)
The official readme.txt might help

genesis-widget-background/genesis-widget-background.php Passed 13 tests

The main PHP file in "Genesis Widget Background" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
68 characters long description:
Adds the featured image or custom image as background of the widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin443 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP28777264
CSS26070
PO File1181857
JavaScript1171252

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity8.80
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
banner-772x250.png17.09KB5.08KB▼ 70.27%