83% featured-background-image-free

Code Review | Featured Background Image - Free

WordPress plugin Featured Background Image - Free scored 83% from 54 tests.

About plugin

  • Plugin page: featured-backgrou...
  • Plugin version: 1.0.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.3
  • WordPress version: 6.3.1
  • First release: Jun 12, 2019
  • Latest release: Jan 21, 2022
  • Number of updates: 8
  • Update frequency: every 119.3 days
  • Top authors: mjkhajeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 818 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.70ms] Passed 4 tests

Server-side resources used by Featured Background Image - Free
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0148.42 ▲5.20
Dashboard /wp-admin3.32 ▲0.0149.30 ▲5.05
Posts /wp-admin/edit.php3.37 ▲0.0145.53 ▼3.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.14 ▼3.62
Media Library /wp-admin/upload.php3.24 ▲0.0138.96 ▲4.55

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Featured Background Image - Free
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.40 ▼0.972.03 ▲0.0943.97 ▼0.96
Dashboard /wp-admin2,206 ▲184.84 ▼0.04111.26 ▼8.3545.01 ▲1.32
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0037.13 ▼3.0131.88 ▼2.61
Add New Post /wp-admin/post-new.php6,573 ▲5,03120.64 ▲2.30928.09 ▲316.1876.31 ▲26.82
Media Library /wp-admin/upload.php1,385 ▼34.21 ▲0.01116.72 ▲10.6547.34 ▲3.57

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Almost there! Just fix the following items
  • 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/featured-background-image-free/admin/meta-box.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can take inspiration from this readme.txt

featured-background-image-free/init.php 85% from 13 tests

This is the main PHP file of "Featured Background Image - Free" version 1.0.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("featured-background-image-free.php" instead of "init.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin231 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22720151
PO File1212266
JavaScript10014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity13.50
▷ Minimum class complexity12.00
▷ Maximum class complexity15.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods218.18%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin