84% add-background-size-to-customizer

Code Review | Add Background-Size to Customizer

WordPress plugin Add Background-Size to Customizer scored84%from 54 tests.

About plugin

  • Plugin page: add-background-si...
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-4.2.3
  • WordPress version: 6.3.1
  • First release: Jul 26, 2015
  • Latest release: Jul 26, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: cmborchert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,671 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.28ms] Passed 4 tests

Analyzing server-side resources used by Add Background-Size to Customizer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0144.40 ▲6.78
Dashboard /wp-admin3.31 ▲0.0041.72 ▼11.31
Posts /wp-admin/edit.php3.36 ▲0.0049.01 ▲2.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.31 ▼1.97
Media Library /wp-admin/upload.php3.23 ▲0.0036.15 ▲1.42

Server storage [IO: ▲0.14MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Add Background-Size to Customizer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.58 ▼0.771.72 ▼0.1541.84 ▼2.76
Dashboard /wp-admin2,206 ▲245.90 ▲0.07102.28 ▲2.4238.84 ▼2.86
Posts /wp-admin/edit.php2,092 ▲62.05 ▲0.0438.81 ▲2.5535.04 ▲0.79
Add New Post /wp-admin/post-new.php1,542 ▼018.27 ▼0.11618.66 ▲8.3362.75 ▲11.04
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.01100.24 ▲1.8342.38 ▲2.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-background-size-to-customizer/add-bg-size-to-customizer.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: appearance, image, css, customizer, background

add-background-size-to-customizer/add-bg-size-to-customizer.php 85% from 13 tests

"Add Background-Size to Customizer" version 0.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("add-background-size-to-customizer.php" instead of "add-bg-size-to-customizer.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 312 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin53 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151653

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin