78% average-head-footer-code

Code Review | Average Head & Footer Code

WordPress plugin Average Head & Footer Code scored78%from 54 tests.

About plugin

  • Plugin page: average-head-foot...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Aug 8, 2014
  • Latest release: Dec 5, 2014
  • Number of updates: 33
  • Update frequency: every 3.6 days
  • Top authors: average.technology (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /5,581 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.91ms] Passed 4 tests

Analyzing server-side resources used by Average Head & Footer Code
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.72 ▼6.38
Dashboard /wp-admin3.33 ▲0.0342.48 ▼6.70
Posts /wp-admin/edit.php3.38 ▲0.0247.35 ▲1.09
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.81 ▲0.37
Media Library /wp-admin/upload.php3.25 ▲0.0236.97 ▲1.17
Head & Footer Code /wp-admin/options-general.php?page=avrghdftrcd_options3.2229.98

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Average Head & Footer Code
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.61 ▼0.771.85 ▲0.0339.22 ▼4.59
Dashboard /wp-admin2,207 ▲195.91 ▲1.05103.66 ▼7.8040.80 ▲0.58
Posts /wp-admin/edit.php2,093 ▲72.02 ▲0.0239.58 ▲4.2934.49 ▲0.72
Add New Post /wp-admin/post-new.php6,468 ▲4,93920.06 ▲1.86941.80 ▲325.4855.94 ▲0.46
Media Library /wp-admin/upload.php1,386 ▼24.22 ▲0.0399.29 ▲0.2740.74 ▼2.07
Head & Footer Code /wp-admin/options-general.php?page=avrghdftrcd_options9322.1924.9130.42

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=avrghdftrcd_options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=avrghdftrcd_options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/average-head-footer-code/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/average-head-footer-code/average-head-footer-code.php:67

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: head, head code, footer, footer code

average-head-footer-code/average-head-footer-code.php 92% from 13 tests

This is the main PHP file of "Average Head & Footer Code" version 1.1, 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: If Twitter did it, so should we! Keep the description under 140 characters (currently 226 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 plugin149 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods6100.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions5100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin