84% the-single-background

Code Review | The Single Background

WordPress plugin The Single Background scored84%from 54 tests.

About plugin

  • Plugin page: the-single-backgr...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 8, 2015
  • Latest release: Oct 24, 2018
  • Number of updates: 15
  • Update frequency: every 78.2 days
  • Top authors: Alobaidi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /12,392 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
The plugin installed gracefully, with no errors

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

Server-side resources used by The Single Background
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.60 ▲0.35
Dashboard /wp-admin3.31 ▼0.0345.00 ▼20.00
Posts /wp-admin/edit.php3.36 ▲0.0147.89 ▼1.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.06 ▼19.72
Media Library /wp-admin/upload.php3.24 ▲0.0134.82 ▲2.98

Server storage [IO: ▲0.01MB] [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-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for The Single Background
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.17 ▼0.561.70 ▼0.0540.36 ▼0.49
Dashboard /wp-admin2,198 ▲175.62 ▼0.0495.88 ▼5.8541.66 ▼2.86
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.1839.85 ▲1.5139.51 ▲6.35
Add New Post /wp-admin/post-new.php1,526 ▼823.30 ▲5.38663.37 ▲36.5773.09 ▲9.48
Media Library /wp-admin/upload.php1,397 ▼64.20 ▲0.0395.82 ▼4.3442.45 ▼0.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/the-single-background/the-single-background.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (28 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

the-single-background/the-single-background.php Passed 13 tests

The main PHP script in "The Single Background" version 1.0.2 is automatically included on every request by WordPress
112 characters long description:
Add different background color or responsive background image for every single post or page or custom post type.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin58 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2242858

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin