90% adaptive-backgrounds

Code Review | Adaptive Background

WordPress plugin Adaptive Background scored90%from 54 tests.

About plugin

  • Plugin page: adaptive-backgrounds
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 16, 2023
  • Latest release: Mar 16, 2023
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: ashvins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /112 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.06ms] Passed 4 tests

An overview of server-side resources used by Adaptive Background
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.81 ▼2.71
Dashboard /wp-admin3.31 ▼0.0444.49 ▼18.27
Posts /wp-admin/edit.php3.36 ▲0.0045.42 ▼2.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.00 ▼15.34
Media Library /wp-admin/upload.php3.23 ▲0.0034.10 ▼3.85

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Adaptive Background
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,994 ▲24813.98 ▼0.4015.50 ▲13.5441.54 ▼0.37
Dashboard /wp-admin2,209 ▲244.86 ▼0.0397.87 ▼23.1337.75 ▼5.20
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0040.33 ▲0.5734.17 ▼0.42
Add New Post /wp-admin/post-new.php1,533 ▲1423.17 ▲0.05664.79 ▼18.6568.09 ▲10.83
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0694.31 ▼14.4941.30 ▼4.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: image background, adaptive background, adaptive background js, instagram adaptive background

adaptive-backgrounds/adaptive-backgrounds.php 92% from 13 tests

The main PHP file in "Adaptive Background" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin167 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32424136
PHP2173631

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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