93% header-footer

Code Review | Head, Footer and Post Injections

WordPress plugin Head, Footer and Post Injections scored 93% from 53 tests.

About plugin

  • Plugin page: header-footer
  • Plugin version: 3.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 5.8.1
  • First release: Apr 7, 2008
  • Latest release: Mar 17, 2021
  • Number of updates: 121
  • Update frequency: every 39.1 days
  • Top authors: satollo (100%)

Code review

53 tests

User reviews

650 reviews

Install metrics

300,000+ active / 2,812,191 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼273.23ms] Passed 4 tests

A check of server-side resources used by Head, Footer and Post Injections
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1835.87 ▲14.65
Dashboard /wp-admin3.13 ▲0.0750.72 ▲7.12
Posts /wp-admin/edit.php3.18 ▲0.0744.16 ▼0.87
Add New Post /wp-admin/post-new.php5.49 ▲0.0693.08 ▼1,092.25
Media Library /wp-admin/upload.php3.07 ▲0.0627.84 ▼6.91
Header and Footer /wp-admin/options-general.php?page=header-footer/admin/options.php3.1630.31

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 1 new option
New WordPress options
hefo

Browser metrics Passed 4 tests

This is an overview of browser requirements for Head, Footer and Post Injections
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,683 ▲7715.93 ▲0.246.78 ▼3.1449.94 ▲1.57
Dashboard /wp-admin2,961 ▲1116.19 ▲0.39156.76 ▲25.96105.43 ▲3.92
Posts /wp-admin/edit.php2,711 ▲52.70 ▲0.0268.28 ▲1.5590.24 ▲0.87
Add New Post /wp-admin/post-new.php1,898 ▲1619.03 ▲0.16369.31 ▲7.35118.58 ▲13.59
Media Library /wp-admin/upload.php1,780 ▲55.01 ▼0.01145.05 ▼1.33103.48 ▼11.04
Header and Footer /wp-admin/options-general.php?page=header-footer/admin/options.php4,5365.24244.31243.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=header-footer/admin/options.php
    • > Notice in wp-content/plugins/header-footer/admin/controls.php+186
    Undefined index: inner_alt_1
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=header-footer/admin/options.php
    • > Notice in wp-content/plugins/header-footer/admin/controls.php+186
    Undefined index: inner_alt_2
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=header-footer/admin/options.php
    • > Notice in wp-content/plugins/header-footer/admin/controls.php+186
    Undefined index: inner_alt_3
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=header-footer/admin/options.php
    • > Notice in wp-content/plugins/header-footer/admin/controls.php+186
    Undefined index: inner_alt_4
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=header-footer/admin/options.php
    • > Notice in wp-content/plugins/header-footer/admin/controls.php+186
    Undefined index: inner_alt_5
    • > GET request to /wp-admin/options-general.php?page=header-footer/admin/options.php
    • > Notice in wp-content/plugins/header-footer/admin/options.php+394
    Undefined index: mobile_user_agents_parsed

SRP Passed 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
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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
Please take inspiration from this readme.txt

header-footer/plugin.php 85% from 13 tests

Analyzing the main PHP file in "Head, Footer and Post Injections" version 3.2.2
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("header-footer.php" instead of "plugin.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 205 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
Everything looks great! No dangerous files found in this plugin1,213 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP421430841
PO File292160257
CSS3205115

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions36
▷ Named functions2672.22%
▷ Anonymous functions1027.78%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
vendor/jquery-ui/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
vendor/jquery-ui/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
vendor/jquery-ui/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
vendor/jquery-ui/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%