78% header-cleanup

Code Review | Head Cleanup

WordPress plugin Head Cleanup scored78%from 54 tests.

About plugin

  • Plugin page: header-cleanup
  • Plugin version: 0.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.3
  • WordPress version: 6.3.1
  • First release: Nov 15, 2010
  • Latest release: Dec 7, 2011
  • Number of updates: 9
  • Update frequency: every 44.6 days
  • Top authors: mcinvale (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,691 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
Install script ran successfully

Server metrics [RAM: ▼0.16MB] [CPU: ▼13.66ms] Passed 4 tests

Analyzing server-side resources used by Head Cleanup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6915.39 ▼24.87
Dashboard /wp-admin3.33 ▼0.0245.03 ▼19.37
Posts /wp-admin/edit.php3.38 ▲0.0249.82 ▼3.26
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.43 ▼7.12
Media Library /wp-admin/upload.php3.25 ▲0.0236.92 ▲3.57
Head Cleanup /wp-admin/options-general.php?page=binaryheadercleanup3.2031.16

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Head Cleanup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.15 ▼1.221.73 ▲0.1141.30 ▲2.94
Dashboard /wp-admin2,213 ▲254.87 ▼0.0497.55 ▼3.1237.90 ▼8.21
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0541.05 ▲0.7734.87 ▼4.00
Add New Post /wp-admin/post-new.php1,545 ▲1218.14 ▼5.12648.91 ▼64.3049.20 ▼9.76
Media Library /wp-admin/upload.php1,392 ▲74.22 ▼0.0894.56 ▼24.6244.19 ▼1.66
Head Cleanup /wp-admin/options-general.php?page=binaryheadercleanup9352.0223.1525.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=binaryheadercleanup
    • > Notice in wp-content/plugins/header-cleanup/headercleanup.php+72
    Undefined index: update
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=binaryheadercleanup
    • > Notice in wp-content/plugins/header-cleanup/headercleanup.php+148
    Trying to access array offset on value of type bool

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/header-cleanup/headercleanup.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === header-cleanup === )
You can take inspiration from this readme.txt

header-cleanup/headercleanup.php 92% from 13 tests

This is the main PHP file of "Head Cleanup" version 0.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("header-cleanup.php" instead of "headercleanup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin128 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12614128

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.73
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin