10% headit

Code Review | Headit

WordPress plugin Headit scored10%from 54 tests.

About plugin

  • Plugin page: headit
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Dec 21, 2015
  • Latest release: Apr 25, 2017
  • Number of updates: 17
  • Update frequency: every 29.2 days
  • Top authors: StampyCode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,404 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/headit/options.php+31
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.85MB] [CPU: ▼50.41ms] Passed 4 tests

This is a short check of server-side resources used by Headit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.22 ▼4.14
Dashboard /wp-admin2.10 ▼1.215.61 ▼47.04
Posts /wp-admin/edit.php2.10 ▼1.266.04 ▼40.65
Add New Post /wp-admin/post-new.php2.10 ▼3.795.33 ▼84.02
Media Library /wp-admin/upload.php2.10 ▼1.146.21 ▼29.91
Headit /wp-admin/options-general.php?page=headit_options2.105.71

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Headit
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.48 ▼0.141.70 ▼0.0438.72 ▼11.78
Dashboard /wp-admin2,213 ▲255.88 ▲0.96102.89 ▼13.3138.80 ▼7.66
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0537.26 ▼0.3832.34 ▼5.97
Add New Post /wp-admin/post-new.php1,536 ▲223.19 ▼0.03625.59 ▼56.4447.28 ▼7.58
Media Library /wp-admin/upload.php1,395 ▲74.28 ▲0.0595.91 ▼0.2041.98 ▲0.00
Headit /wp-admin/options-general.php?page=headit_options8922.0332.7646.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/headit/options.php+31
    Array and string offset access syntax with curly braces is deprecated
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=headit_options
    • > Deprecated in wp-content/plugins/headit/options.php+31
    Array and string offset access syntax with curly braces is deprecated

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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/headit/headit.php
    • > /wp-content/plugins/headit/options.php

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: csrf, hsts, hpkp, headers, http header...

headit/headit.php Passed 13 tests

The main file in "Headit" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
Allows adding arbitrary HTTP headers to all outbound responses

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin135 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22531135

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin