84% responsive-background-by-djjmz

Code Review | Responsive Background by DJJMZ

WordPress plugin Responsive Background by DJJMZ scored 84% from 54 tests.

About plugin

  • Plugin page: responsive-backgr...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.1
  • WordPress version: 6.3.1
  • First release: Mar 6, 2015
  • Latest release: Jul 8, 2015
  • Number of updates: 10
  • Update frequency: every 12.4 days
  • Top authors: djjmz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,939 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Responsive Background by DJJMZ
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.25 ▼11.28
Dashboard /wp-admin3.31 ▲0.0147.14 ▲1.16
Posts /wp-admin/edit.php3.36 ▲0.0045.84 ▲3.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.27 ▼33.94
Media Library /wp-admin/upload.php3.23 ▲0.0029.59 ▼24.75
RB Settings /wp-admin/options-general.php?page=rb_settings3.2044.61

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Responsive Background by DJJMZ: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.45 ▲0.081.71 ▲0.0140.66 ▲2.32
Dashboard /wp-admin2,210 ▲255.79 ▼0.03118.28 ▼2.0147.37 ▲1.46
Posts /wp-admin/edit.php2,093 ▲72.03 ▲0.0140.21 ▲2.7038.81 ▲0.23
Add New Post /wp-admin/post-new.php1,539 ▲1922.93 ▼0.30633.19 ▼148.4153.01 ▼8.47
Media Library /wp-admin/upload.php1,392 ▲44.17 ▲0.06101.11 ▼26.8241.91 ▼13.91
RB Settings /wp-admin/options-general.php?page=rb_settings7462.0339.7732.26

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
  • 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 | A smoke test targeting 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
The following issues need your attention
  • 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/responsive-background-by-djjmz/index.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

responsive-background-by-djjmz/index.php 92% from 13 tests

The primary PHP file in "Responsive Background by DJJMZ" version 1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("responsive-background-by-djjmz.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin146 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP108146

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions5
▷ Named functions5100.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
There are no PNG files in this plugin