90% block-background

Code Review | Block Background

WordPress plugin Block Background scored 90% from 54 tests.

About plugin

  • Plugin page: block-background
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0.2
  • WordPress version: 6.3.1
  • First release: Apr 5, 2018
  • Latest release: Jan 5, 2019
  • Number of updates: 11
  • Update frequency: every 25.0 days
  • Top authors: AjitBohra (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active / 5,054 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.40ms] Passed 4 tests

Analyzing server-side resources used by Block Background
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.53 ▼11.13
Dashboard /wp-admin3.32 ▲0.0248.63 ▼0.68
Posts /wp-admin/edit.php3.37 ▲0.0248.32 ▲0.88
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.08 ▼14.68
Media Library /wp-admin/upload.php3.25 ▲0.0236.43 ▲5.97

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Block Background
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.39 ▼0.991.68 ▼0.3940.45 ▼4.33
Dashboard /wp-admin2,206 ▲215.83 ▲0.9296.91 ▼8.7441.85 ▼0.94
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0539.37 ▼1.5535.67 ▲0.60
Add New Post /wp-admin/post-new.php1,677 ▲14422.57 ▼0.85651.44 ▲53.8749.89 ▲1.11
Media Library /wp-admin/upload.php1,385 ▼64.19 ▲0.0395.04 ▼1.7943.39 ▲0.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: image, gradient, background, block, gutenberg

block-background/block-background.php 92% from 13 tests

The main PHP script in "Block Background" version 1.0.4 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin84 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP11710878
JavaScript2094
CSS2002

PHP code Passed 2 tests

An overview 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.31
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods562.50%
▷ Protected methods00.00%
▷ Private methods337.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
There are no PNG files in this plugin