100% header-code

Code Review | Header Code

WordPress plugin Header Code scored 100% from 54 tests.

About plugin

  • Plugin page: header-code
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.8.1
  • First release: Oct 20, 2015
  • Latest release: Jul 13, 2021
  • Number of updates: 6
  • Update frequency: every 348.8 days
  • Top authors: GZep (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 3,699 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Header Code
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0035.41 ▼1.50
Dashboard /wp-admin3.08 ▲0.0246.62 ▼1.53
Posts /wp-admin/edit.php3.13 ▲0.0247.77 ▲2.86
Add New Post /wp-admin/post-new.php5.44 ▲0.01101.02 ▼563.44
Media Library /wp-admin/upload.php3.02 ▲0.0133.98 ▼4.08
Header Code /wp-admin/options-general.php?page=header-code2.9931.32

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Header Code
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲11215.97 ▼0.009.08 ▼0.2748.14 ▼4.89
Dashboard /wp-admin2,975 ▲415.91 ▼0.30147.70 ▼10.67106.03 ▼3.04
Posts /wp-admin/edit.php2,744 ▲52.70 ▼0.0273.64 ▲8.6386.64 ▼1.86
Add New Post /wp-admin/post-new.php1,503 ▼18018.41 ▼0.11393.97 ▼17.58107.12 ▼17.04
Media Library /wp-admin/upload.php1,812 ▲615.03 ▲0.09152.28 ▼2.09138.03 ▲17.69
Header Code /wp-admin/options-general.php?page=header-code1,0172.0962.7974.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === header-code === )
The official readme.txt might help

header-code/header-code.php Passed 13 tests

The main PHP script in "Header Code" version 1.2 is automatically included on every request by WordPress
53 characters long description:
Simplest plugin that injects any code into wp_head().

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
Everything looks great! No dangerous files found in this plugin78 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP316857
PO File13421

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin