10% headache-killer

Code Review | Headache Killer

WordPress plugin Headache Killer scored 10% from 54 tests.

About plugin

  • Plugin page: headache-killer
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 15, 2016
  • Latest release: Nov 19, 2016
  • Number of updates: 15
  • Update frequency: N/A
  • Top authors: bouchajohn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 540 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/headache-killer/headache-killer.php+35
    Use of undefined constant iekiller_browser_check - assumed 'iekiller_browser_check' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.94MB] [CPU: ▼55.46ms] Passed 4 tests

A check of server-side resources used by Headache Killer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.413.84 ▼38.14
Dashboard /wp-admin2.07 ▼1.236.32 ▼40.28
Posts /wp-admin/edit.php2.07 ▼1.286.11 ▼49.12
Add New Post /wp-admin/post-new.php2.07 ▼3.825.31 ▼94.29
Media Library /wp-admin/upload.php2.07 ▼1.165.31 ▼30.28

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Headache Killer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.194.35 ▲2.5640.46 ▼9.22
Dashboard /wp-admin2,209 ▲185.90 ▲1.0397.38 ▼6.5339.11 ▼1.08
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0140.86 ▲1.7035.88 ▼0.42
Add New Post /wp-admin/post-new.php1,533 ▼123.28 ▲0.12659.46 ▼19.2364.36 ▲9.99
Media Library /wp-admin/upload.php1,388 ▼04.18 ▲0.0298.70 ▼9.0140.33 ▼4.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/headache-killer/headache-killer.php+35
    Use of undefined constant iekiller_browser_check - assumed 'iekiller_browser_check' (this will throw an Error in a future version of PHP)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/headache-killer/headache-killer.php

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 errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

headache-killer/headache-killer.php Passed 13 tests

The entry point to "Headache Killer" version 1.0 is a PHP file that has certain tags in its header comment area
46 characters long description:
Let's kill Internet Explorer once and for all.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected78 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
HTML18050
PHP1153428

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
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%
Functions4
▷ Named functions4100.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
There were not PNG files found in your plugin