84% header-footer

Code Review | Head, Footer and Post Injections

WordPress plugin Head, Footer and Post Injections scored84%from 54 tests.

About plugin

  • Plugin page: header-footer
  • Plugin version: 3.2.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.2
  • WordPress version: 6.3.1
  • First release: Apr 7, 2008
  • Latest release: Oct 30, 2023
  • Number of updates: 133
  • Update frequency: every 42.7 days
  • Top authors: satollo (100%)

Code review

54 tests

User reviews

715 reviews

Install metrics

400,000+ active /3,998,399 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.10ms] Passed 4 tests

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 /3.56 ▲0.0942.62 ▲2.35
Dashboard /wp-admin3.38 ▲0.0844.08 ▼7.98
Posts /wp-admin/edit.php3.50 ▲0.1444.56 ▼3.14
Add New Post /wp-admin/post-new.php5.97 ▲0.0889.97 ▼2.30
Media Library /wp-admin/upload.php3.31 ▲0.0734.17 ▼2.99
Head and Footer /wp-admin/options-general.php?page=header-footer/admin/options.php3.4032.67

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Head, Footer and Post Injections
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.25 ▼0.321.69 ▼0.1038.37 ▼6.00
Dashboard /wp-admin2,196 ▲185.54 ▼0.1682.80 ▼32.3538.33 ▼8.21
Posts /wp-admin/edit.php2,107 ▲72.01 ▼0.0135.40 ▼1.5832.39 ▼3.81
Add New Post /wp-admin/post-new.php6,239 ▲4,71320.95 ▼2.26830.36 ▲156.5369.64 ▲19.11
Media Library /wp-admin/upload.php1,398 ▲14.15 ▼0.0394.31 ▼56.7741.53 ▼12.98
Head and Footer /wp-admin/options-general.php?page=header-footer/admin/options.php3,8504.93148.23158.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 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+163
    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+163
    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+163
    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+163
    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+163
    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+455
    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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: ads, amp, footer, facebook pixel, analytics...

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

This is the main PHP file of "Head, Footer and Post Injections" version 3.2.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 205 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("header-footer.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin993 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP422237878
CSS3205115

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions35
▷ Named functions2571.43%
▷ Anonymous functions1028.57%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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_555555_256x240.png6.82KB4.17KB▼ 38.82%
vendor/jquery-ui/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
vendor/jquery-ui/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
vendor/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
vendor/jquery-ui/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%