84% wp-head-cleanup

Code Review | WP Head Cleanup

WordPress plugin WP Head Cleanup scored84%from 54 tests.

About plugin

  • Plugin page: wp-head-cleanup
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Jul 12, 2013
  • Latest release: Sep 22, 2014
  • Number of updates: 10
  • Update frequency: every 48.9 days
  • Top authors: nablasol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,767 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by WP Head Cleanup
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.86 ▼5.45
Dashboard /wp-admin3.33 ▼0.0148.00 ▼19.54
Posts /wp-admin/edit.php3.38 ▲0.0349.82 ▲6.07
Add New Post /wp-admin/post-new.php5.91 ▲0.03107.95 ▼30.22
Media Library /wp-admin/upload.php3.25 ▲0.0339.29 ▲2.16
WP head Cleanup /wp-admin/options-general.php?page=wp-head-cleanup/wp_headcleanup.php3.2234.34

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
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Head Cleanup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.24 ▼1.351.71 ▼0.0940.59 ▼4.55
Dashboard /wp-admin2,213 ▲225.83 ▲0.84107.88 ▼12.7539.63 ▼10.08
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0539.70 ▼4.5634.82 ▼3.56
Add New Post /wp-admin/post-new.php1,545 ▲1518.21 ▼0.13621.34 ▼7.6063.47 ▲10.52
Media Library /wp-admin/upload.php1,395 ▲104.29 ▲0.12101.48 ▼1.3443.23 ▲0.11
WP head Cleanup /wp-admin/options-general.php?page=wp-head-cleanup/wp_headcleanup.php8812.0523.0728.69

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-head-cleanup/wp_headcleanup.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: head cleanup, wphead cleaner, cleaner, header cleaner

wp-head-cleanup/wp_headcleanup.php 92% from 13 tests

The principal PHP file in "WP Head Cleanup" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-head-cleanup.php" instead of "wp_headcleanup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin105 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13431105

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
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
No PNG files were detected