94% add-nsa-header

Code Review | Add NSA Header

WordPress plugin Add NSA Header scored 94% from 54 tests.

About plugin

  • Plugin page: add-nsa-header
  • Plugin version: 2.7182
  • PHP compatiblity: 4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.2-5.9
  • WordPress version: 5.9.2
  • First release: Nov 26, 2020
  • Latest release: Jan 5, 2022
  • Number of updates: 8
  • Update frequency: every 50.6 days
  • Top authors: tehmaxh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 255 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.01MB] [CPU: ▼290.26ms] Passed 4 tests

Server-side resources used by Add NSA Header
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0255.20 ▲2.19
Dashboard /wp-admin3.42 ▲0.0133.78 ▼1.66
Posts /wp-admin/edit.php3.65 ▲0.0137.97 ▼0.13
Add New Post /wp-admin/post-new.php6.92 ▼0.0894.83 ▼1,161.34
Media Library /wp-admin/upload.php3.30 ▲0.0125.26 ▲2.10

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Add NSA Header
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4116.27 ▲0.268.25 ▲2.162.52 ▲0.01
Dashboard /wp-admin2,888 ▲306.17 ▼0.02115.92 ▼19.55153.74 ▼7.29
Posts /wp-admin/edit.php2,688 ▼63.23 ▼0.0162.66 ▼2.10135.83 ▼6.76
Add New Post /wp-admin/post-new.php1,711 ▲5021.02 ▲4.83443.10 ▲44.02157.85 ▲7.82
Media Library /wp-admin/upload.php1,701 ▲65.49 ▲0.00145.49 ▲6.07182.67 ▼4.98

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 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-nsa-header/nsa-header.php:35

User-side errors Passed 1 test

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


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: http header

add-nsa-header/nsa-header.php 92% from 13 tests

"Add NSA Header" version 2.7182's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("add-nsa-header.php" instead of "nsa-header.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin25 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ 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
There were not PNG files found in your plugin