10% get-background-from-library

Code Review | Get Background From Library

WordPress plugin Get Background From Library scored10%from 54 tests.

About plugin

  • Plugin page: get-background-fr...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 6.3.1
  • First release: Nov 19, 2010
  • Latest release: Apr 4, 2013
  • Number of updates: 11
  • Update frequency: every 78.8 days
  • Top authors: trepmal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,703 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/get-background-from-library/get-background-from-library.php+16
    Methods with the same name as their class will not be constructors in a future version of PHP; bgfromlibrary has a deprecated constructor

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

Server-side resources used by Get Background From Library
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0051.05 ▲10.11
Dashboard /wp-admin3.31 ▲0.0149.83 ▼3.67
Posts /wp-admin/edit.php3.36 ▲0.0151.28 ▲2.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.59 ▼17.37
Media Library /wp-admin/upload.php3.23 ▲0.0136.84 ▲1.24

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Get Background From Library
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.74 ▲0.462.45 ▲0.6043.81 ▼0.77
Dashboard /wp-admin2,206 ▲154.84 ▼0.03104.77 ▲4.9838.61 ▼2.69
Posts /wp-admin/edit.php2,092 ▼02.02 ▲0.0134.12 ▼8.4935.26 ▼4.25
Add New Post /wp-admin/post-new.php1,536 ▲223.30 ▲0.19665.09 ▼16.5463.51 ▲10.41
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0697.05 ▼18.7545.45 ▼4.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/get-background-from-library/get-background-from-library.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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
Attributes that require attention:
  • Tested up to: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

get-background-from-library/get-background-from-library.php Passed 13 tests

The main file in "Get Background From Library" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
69 characters long description:
Grab an image from the Media Library to use a your custom background.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected35 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP121135

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin