84% clean-html

Code Review | Cleanup HTML

WordPress plugin Cleanup HTML scored84%from 54 tests.

About plugin

  • Plugin page: clean-html
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 6.3.1
  • First release: Sep 13, 2013
  • Latest release: Nov 30, 2020
  • Number of updates: 16
  • Update frequency: every 164.6 days
  • Top authors: closemarketing (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

3,000+ active /6,088 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Cleanup HTML
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.11 ▼3.80
Dashboard /wp-admin3.32 ▲0.0148.84 ▼0.02
Posts /wp-admin/edit.php3.37 ▲0.0147.97 ▼3.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.50 ▼12.75
Media Library /wp-admin/upload.php3.24 ▲0.0140.54 ▼0.05

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Cleanup HTML
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.23 ▲0.041.93 ▲0.0138.76 ▲0.65
Dashboard /wp-admin2,197 ▲195.59 ▼0.1285.64 ▼24.6344.99 ▲2.49
Posts /wp-admin/edit.php2,102 ▲22.02 ▲0.0335.30 ▼7.6935.31 ▼3.40
Add New Post /wp-admin/post-new.php1,530 ▲223.28 ▲0.31656.82 ▼35.5859.25 ▲7.51
Media Library /wp-admin/upload.php1,402 ▲24.16 ▼0.01116.11 ▲1.5147.70 ▼2.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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× 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/clean-html/cleanup-html.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Screenshot #1 (This is the new cleanup button.) image not found
Please take inspiration from this readme.txt

clean-html/cleanup-html.php 92% from 13 tests

The entry point to "Cleanup HTML" version 1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("clean-html.php" instead of "cleanup-html.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected78 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ 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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
tinymce/cleanuphtml.png1.11KB0.19KB▼ 82.44%
screenshot-1.png7.12KB2.64KB▼ 62.88%