84% addfunc-head-footer-code

Code Review | AddFunc Head & Footer Code

WordPress plugin AddFunc Head & Footer Code scored84%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: 6.3.1
  • 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 /214,619 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

An overview of server-side resources used by AddFunc Head & Footer Code
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0635.36 ▼4.53
Dashboard /wp-admin3.35 ▲0.0143.29 ▼26.96
Posts /wp-admin/edit.php3.40 ▲0.0546.37 ▼2.61
Add New Post /wp-admin/post-new.php5.83 ▼0.0679.89 ▼19.98
Media Library /wp-admin/upload.php3.27 ▲0.0533.77 ▼0.01
Head & Footer Code /wp-admin/options-general.php?page=aFhfc_options3.2432.29

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

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

Browser metrics Passed 4 tests

Checking browser requirements for AddFunc Head & Footer Code
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.22 ▼1.131.83 ▲0.0740.34 ▼3.12
Dashboard /wp-admin2,207 ▲225.80 ▼0.0794.77 ▼10.1236.63 ▼3.01
Posts /wp-admin/edit.php2,093 ▲41.99 ▲0.0039.66 ▲2.7735.34 ▲0.48
Add New Post /wp-admin/post-new.php6,276 ▲4,76226.16 ▲8.47891.89 ▲182.4456.31 ▲2.95
Media Library /wp-admin/upload.php1,395 ▲134.22 ▲0.0393.54 ▼14.3343.38 ▼3.74
Head & Footer Code /wp-admin/options-general.php?page=aFhfc_options8852.0522.6330.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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
    • > 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

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please 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 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected218 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31127218

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
PNG images were not found in this plugin