100% lh-hsts

Code Review | LH HSTS

WordPress plugin LH HSTS scored 100% from 54 tests.

About plugin

  • Plugin page: lh-hsts
  • Plugin version: 1.25
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4
  • WordPress version: 5.9.2
  • First release: Mar 2, 2016
  • Latest release: Jul 12, 2020
  • Number of updates: 14
  • Update frequency: every 113.8 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active / 154,630 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by LH HSTS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0258.61 ▼0.78
Dashboard /wp-admin3.43 ▲0.0236.46 ▼3.88
Posts /wp-admin/edit.php3.65 ▲0.0140.03 ▼2.31
Add New Post /wp-admin/post-new.php6.89 ▼0.08101.88 ▼1,278.68
Media Library /wp-admin/upload.php3.30 ▲0.0126.66 ▼1.80

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for LH HSTS
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲2115.84 ▲0.205.60 ▼0.702.29 ▲0.33
Dashboard /wp-admin2,895 ▲446.14 ▼0.01117.81 ▼14.29164.55 ▲5.56
Posts /wp-admin/edit.php2,691 ▼03.23 ▲0.0165.29 ▲0.78137.41 ▼4.30
Add New Post /wp-admin/post-new.php1,661 ▼016.40 ▼0.14435.51 ▼22.13159.66 ▼8.49
Media Library /wp-admin/upload.php1,703 ▲55.55 ▲0.02149.32 ▲9.41189.31 ▲1.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
5 plugin tags: https, hsts, security, ssl, redirect

lh-hsts/lh-hsts.php Passed 13 tests

The main PHP script in "LH HSTS" version 1.25 is automatically included on every request by WordPress
83 characters long description:
Adds HTTP Strict Transport Security to wordpress, options can be changed by filters

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
Good job! No executable or dangerous file extensions detected71 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1251471

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin