10% wpxp-background-media

Code Review | WPXP Background Media

WordPress plugin WPXP Background Media scored10%from 54 tests.

About plugin

  • Plugin page: wpxp-background-m...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.0.3
  • WordPress version: 6.3.1
  • First release: Feb 18, 2019
  • Latest release: Feb 20, 2019
  • Number of updates: 5
  • Update frequency: every 1.0 days
  • Top authors: manjonka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /551 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/wpxp-background-media/wpxp-background-media.php+379
    Trying to access array offset on value of type null

Server metrics [RAM: ▲0.15MB] [CPU: ▼7.86ms] Passed 4 tests

A check of server-side resources used by WPXP Background Media
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1156.73 ▲15.67
Dashboard /wp-admin3.49 ▲0.1549.98 ▼4.62
Posts /wp-admin/edit.php3.61 ▲0.2152.07 ▼3.41
Add New Post /wp-admin/post-new.php6.20 ▲0.2786.43 ▼25.29
Media Library /wp-admin/upload.php3.42 ▲0.1538.89 ▲1.90

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WPXP Background Media
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲15913.49 ▼0.6714.41 ▲12.7747.14 ▲6.42
Dashboard /wp-admin2,215 ▲385.58 ▼0.0888.25 ▼4.0342.60 ▼3.34
Posts /wp-admin/edit.php2,123 ▲232.15 ▲0.1435.53 ▼2.2136.58 ▼1.87
Add New Post /wp-admin/post-new.php1,424 ▼10417.86 ▼5.21632.38 ▲8.9752.11 ▲2.00
Media Library /wp-admin/upload.php1,426 ▲264.19 ▲0.03103.54 ▼0.0146.43 ▲2.52

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 11× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/wpxp-background-media/admin/classes/media-queries.php
    • > /wp-content/plugins/wpxp-background-media/admin/classes/media-metadata.php
    • > /wp-content/plugins/wpxp-background-media/wpxp-background-media.php
    • > /wp-content/plugins/wpxp-background-media/admin/index.php
    • > /wp-content/plugins/wpxp-background-media/admin/inc/config.php
    • > /wp-content/plugins/wpxp-background-media/admin/classes/overlay.php
    • > /wp-content/plugins/wpxp-background-media/admin/inc/descriptions.php
    • > /wp-content/plugins/wpxp-background-media/admin/classes/settings.php
    • > /wp-content/plugins/wpxp-background-media/admin/inc/helpers.php
    • > /wp-content/plugins/wpxp-background-media/admin/classes/metabox-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: media, video, image, background

wpxp-background-media/wpxp-background-media.php 92% from 13 tests

The principal PHP file in "WPXP Background Media" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 246 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin2,875 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP146067761,992
CSS32611637
JavaScript253104246

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity34.33
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods172
▷ Static methods2916.86%
▷ Public methods6638.37%
▷ Protected methods00.00%
▷ Private methods10661.63%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png34.97KB14.28KB▼ 59.16%