84% wp-head-cleaner

Code Review | wp_head() cleaner

WordPress plugin wp_head() cleaner scored84%from 54 tests.

About plugin

  • Plugin page: wp-head-cleaner
  • Plugin version: 2.0.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 13, 2015
  • Latest release: Oct 29, 2023
  • Number of updates: 28
  • Update frequency: every 106.0 days
  • Top authors: jwilsson (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

3,000+ active /46,428 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.57ms] Passed 4 tests

This is a short check of server-side resources used by wp_head() cleaner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.24 ▼11.15
Dashboard /wp-admin3.32 ▲0.0245.43 ▼9.94
Posts /wp-admin/edit.php3.37 ▲0.0245.23 ▼5.89
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.71 ▼11.29
Media Library /wp-admin/upload.php3.24 ▲0.0232.81 ▼1.15
wp_head() cleaner /wp-admin/options-general.php?page=wp_head_cleaner3.2331.09

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: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for wp_head() cleaner
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.10 ▼0.041.68 ▼0.2239.45 ▼6.75
Dashboard /wp-admin2,202 ▲255.60 ▼0.0787.94 ▼25.1338.54 ▼2.54
Posts /wp-admin/edit.php2,101 ▼22.01 ▲0.0740.58 ▼2.1335.35 ▼8.09
Add New Post /wp-admin/post-new.php1,529 ▲123.82 ▲0.68639.04 ▼31.6552.28 ▼10.53
Media Library /wp-admin/upload.php1,404 ▲14.27 ▲0.06100.00 ▼2.7643.48 ▼0.68
wp_head() cleaner /wp-admin/options-general.php?page=wp_head_cleaner9712.0327.7930.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-head-cleaner/wp-head-cleaner.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 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
6 plugin tags: meta, generator, header, clean, remove...

wp-head-cleaner/wp-head-cleaner.php Passed 13 tests

"wp_head() cleaner" version 2.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
41 characters long description:
Remove unused tags from wp_head() output.

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
Everything looks great! No dangerous files found in this plugin347 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22712250
PO File1394097

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin