84% host-header

Code Review | WordPress Host Headers

WordPress plugin WordPress Host Headers scored84%from 54 tests.

About plugin

  • Plugin page: host-header
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5-5.5
  • WordPress version: 6.3.1
  • First release: Apr 18, 2020
  • Latest release: Apr 18, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: whyisjake (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,098 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 gracefully, with no errors

Server metrics [RAM: ▼0.19MB] [CPU: ▼14.90ms] Passed 4 tests

Analyzing server-side resources used by WordPress Host Headers
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▼0.6320.53 ▼21.83
Dashboard /wp-admin3.32 ▲0.0243.52 ▼3.24
Posts /wp-admin/edit.php3.18 ▼0.1730.36 ▼14.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.56 ▼19.94
Media Library /wp-admin/upload.php3.25 ▲0.0232.34 ▼1.02
Host Header Settings /wp-admin/options-general.php?page=host-header-settings3.1928.15

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Host Headers
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.51 ▲0.111.82 ▼0.2242.67 ▼1.91
Dashboard /wp-admin2,210 ▲215.83 ▲0.9094.77 ▼13.9541.37 ▲2.52
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0134.61 ▼2.1334.54 ▼5.47
Add New Post /wp-admin/post-new.php1,545 ▲1218.00 ▼4.96611.68 ▲28.8352.60 ▼10.28
Media Library /wp-admin/upload.php1,395 ▲74.20 ▲0.0094.80 ▼3.2041.99 ▼3.65
Host Header Settings /wp-admin/options-general.php?page=host-header-settings8032.0224.9726.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=host-header-settings
    • > Notice in wp-content/plugins/host-header/host-header.php+93
    Trying to access array offset on value of type bool

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: hosting, security

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

Analyzing the main PHP file in "WordPress Host Headers" version 1.0.1
76 characters long description:
Add a Host-Header to track down hosting partners in helping combat web spam.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin105 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2192772
Markdown113029
JSON1004

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.18
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%
Constants1
▷ Global constants1100.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 files were detected