94% addfunc-head-footer-code

Code Review | AddFunc Head & Footer Code

WordPress plugin AddFunc Head & Footer Code scored 94% from 54 tests.

About plugin

  • Plugin page: addfunc-head-foot...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 5.9.2
  • First release: Dec 1, 2014
  • Latest release: May 29, 2019
  • Number of updates: 36
  • Update frequency: every 45.6 days
  • Top authors: joerhoney (72.22%)AddFunc (30.56%)

Code review

54 tests

User reviews

25 reviews

Install metrics

30,000+ active / 200,564 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼334.11ms] Passed 4 tests

This is a short check of server-side resources used by AddFunc Head & Footer Code
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1253.67 ▲1.05
Dashboard /wp-admin3.45 ▲0.0534.59 ▼2.37
Posts /wp-admin/edit.php3.69 ▲0.0538.29 ▼5.72
Add New Post /wp-admin/post-new.php6.93 ▼0.0495.64 ▼1,328.23
Media Library /wp-admin/upload.php3.34 ▲0.0526.46 ▼0.13
Head & Footer Code /wp-admin/options-general.php?page=aFhfc_options3.3125.77

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for AddFunc Head & Footer Code
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,776 ▲3415.59 ▼0.466.26 ▼0.682.25 ▲0.26
Dashboard /wp-admin2,869 ▲116.11 ▼0.02123.48 ▼10.33174.41 ▲12.13
Posts /wp-admin/edit.php2,693 ▲53.24 ▲0.0068.25 ▲3.37144.80 ▼0.60
Add New Post /wp-admin/post-new.php1,742 ▲3217.04 ▼3.67453.07 ▼29.79178.87 ▼30.27
Media Library /wp-admin/upload.php1,703 ▲115.52 ▼0.02150.40 ▼11.73198.45 ▼12.92
Head & Footer Code /wp-admin/options-general.php?page=aFhfc_options1,1392.3755.37128.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: plugin_id in wp-content/plugins/addfunc-head-footer-code/options.php on line 6
    • > PHP Notice
      Undefined variable: plugin_id in wp-content/plugins/addfunc-head-footer-code/options.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/addfunc-head-footer-code/options.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/addfunc-head-footer-code/addfunc-head-footer-code.php:91

User-side errors Passed 1 test

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


Plugin configuration 93% 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 require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

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

The entry point to "AddFunc Head & Footer Code" version 2.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 235 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected218 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods7100.00%
▷ Public methods7100.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