90% wp-secure-http-headers

Code Review | WP Secure HTTP Headers

WordPress plugin WP Secure HTTP Headers scored90%from 54 tests.

About plugin

  • Plugin page: wp-secure-http-he...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.2
  • WordPress version: 6.3.1
  • First release: Jun 17, 2019
  • Latest release: Jun 17, 2019
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: eastsidecode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /643 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by WP Secure HTTP Headers
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.78 ▼2.29
Dashboard /wp-admin3.32 ▲0.0145.33 ▼6.41
Posts /wp-admin/edit.php3.37 ▲0.0146.35 ▼1.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.05 ▼19.15
Media Library /wp-admin/upload.php3.24 ▲0.0137.09 ▲0.19

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Secure HTTP Headers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.071.87 ▲0.1341.29 ▼4.41
Dashboard /wp-admin2,209 ▲185.85 ▲0.8296.07 ▼9.4138.70 ▼4.27
Posts /wp-admin/edit.php2,089 ▼32.04 ▼0.0135.01 ▼7.7641.85 ▲5.05
Add New Post /wp-admin/post-new.php1,514 ▼2017.46 ▼6.03698.95 ▲48.6852.81 ▼8.83
Media Library /wp-admin/upload.php1,388 ▼34.31 ▲0.12107.89 ▲8.4948.15 ▲2.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: security, http headers

wp-secure-http-headers/index.php 92% from 13 tests

The main PHP script in "WP Secure HTTP Headers" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-secure-http-headers.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin16 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1201616

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected