84% custom-background-extended

Code Review | Custom Background Extended

WordPress plugin Custom Background Extended scored84%from 54 tests.

About plugin

  • Plugin page: custom-background...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.7
  • WordPress version: 6.3.1
  • First release: Sep 27, 2013
  • Latest release: Sep 27, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: greenshady (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /27,724 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by Custom Background Extended
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.83 ▲1.29
Dashboard /wp-admin3.32 ▲0.0253.81 ▲6.66
Posts /wp-admin/edit.php3.37 ▲0.0247.33 ▲6.12
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.60 ▲1.59
Media Library /wp-admin/upload.php3.24 ▲0.0234.52 ▲1.09

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Custom Background Extended: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6814.74 ▲0.461.63 ▼0.3040.13 ▼0.64
Dashboard /wp-admin2,206 ▲145.91 ▲0.99105.29 ▼13.7038.02 ▼10.44
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0139.88 ▼2.4735.80 ▼3.66
Add New Post /wp-admin/post-new.php6,484 ▲4,95119.69 ▼3.80922.27 ▲273.5139.98 ▼12.69
Media Library /wp-admin/upload.php1,382 ▼04.20 ▼0.01102.26 ▲2.2341.83 ▲0.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/custom-background-extended/admin/class-custom-backgrounds-admin.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-background-extended/inc/class-custom-backgrounds-filter.php:91
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-background-extended/custom-background-extended.php:72

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Custom background meta box.), #2 (Custom background meta box on the edit post screen.), #3 (Multiple background views of a single post.)
You can look at the official readme.txt

custom-background-extended/custom-background-extended.php 92% from 13 tests

The main PHP script in "Custom Background Extended" version 0.1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 266 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
There were no executable files found in this plugin458 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3166446353
JavaScript2384260
Markdown139045

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity23.67
▷ Minimum class complexity5.00
▷ Maximum class complexity40.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes3100.00%
Methods28
▷ Static methods414.29%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ 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
3 PNG files occupy 0.42MB with 0.19MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png106.65KB44.77KB▼ 58.03%
screenshot-3.png14.21KB12.01KB▼ 15.47%
screenshot-2.png306.66KB107.13KB▼ 65.07%