84% kurt-vonnegut-http-header

Code Review | Kurt Vonnegut HTTP header

WordPress plugin Kurt Vonnegut HTTP header scored84%from 54 tests.

About plugin

  • Plugin page: kurt-vonnegut-htt...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.3
  • WordPress version: 6.3.1
  • First release: Aug 24, 2017
  • Latest release: Sep 4, 2023
  • Number of updates: 8
  • Update frequency: every 275.3 days
  • Top authors: krasimirstoev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /630 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Kurt Vonnegut HTTP header
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.84 ▼0.32
Dashboard /wp-admin3.31 ▲0.0146.23 ▼1.82
Posts /wp-admin/edit.php3.37 ▲0.0151.86 ▲6.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.30 ▼12.39
Media Library /wp-admin/upload.php3.24 ▲0.0036.08 ▼0.29

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Kurt Vonnegut HTTP header
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5513.32 ▼1.084.08 ▲2.4541.90 ▲2.55
Dashboard /wp-admin2,203 ▲145.84 ▼0.0596.27 ▼13.5539.87 ▼3.62
Posts /wp-admin/edit.php2,086 ▼62.05 ▲0.0840.44 ▲1.2736.26 ▲1.09
Add New Post /wp-admin/post-new.php1,533 ▲1423.34 ▲0.22674.32 ▲65.2651.44 ▼0.45
Media Library /wp-admin/upload.php1,388 ▼04.30 ▲0.1396.03 ▼14.3541.75 ▼6.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/kurt-vonnegut-http-header/wp-kurt-legacy.php:28

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === kurt-vonnegut-http-header === )
The official readme.txt is a good inspiration

kurt-vonnegut-http-header/wp-kurt-legacy.php 92% from 13 tests

"Kurt Vonnegut HTTP header" version 0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("kurt-vonnegut-http-header.php" instead of "wp-kurt-legacy.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
No dangerous file extensions were detected21 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2172221

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
No PNG images were found in this plugin