89% minify-html-markup

Code Review | Minify HTML

WordPress plugin Minify HTML scored89%from 54 tests.

About plugin

  • Plugin page: minify-html-markup
  • Plugin version: 2.1.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.3-6.3
  • WordPress version: 6.3.1
  • First release: Feb 18, 2016
  • Latest release: Sep 20, 2023
  • Number of updates: 86
  • Update frequency: every 32.2 days
  • Top authors: teckel (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

10,000+ active /195,932 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.06MB] [CPU: ▼3.34ms] Passed 4 tests

This is a short check of server-side resources used by Minify HTML
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0834.40 ▼6.30
Dashboard /wp-admin3.37 ▲0.0648.10 ▲2.00
Posts /wp-admin/edit.php3.42 ▲0.0651.70 ▲6.61
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.46 ▼7.26
Media Library /wp-admin/upload.php3.29 ▲0.0633.69 ▼1.80
Minify HTML /wp-admin/options-general.php?page=minify_html_options3.2634.38

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Minify HTML
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,649 ▼10813.21 ▼1.431.83 ▼0.2538.49 ▼9.54
Dashboard /wp-admin2,210 ▲224.84 ▼0.06104.45 ▼3.7938.27 ▼5.09
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0240.49 ▲1.5639.38 ▼0.18
Add New Post /wp-admin/post-new.php1,536 ▲323.06 ▼0.16670.70 ▼13.8058.94 ▼0.02
Media Library /wp-admin/upload.php1,389 ▲44.20 ▼0.0597.62 ▼7.8145.16 ▼2.10
Minify HTML /wp-admin/options-general.php?page=minify_html_options9721.8328.2128.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Tags: There are too many tags (20 tag instead of maximum 10)
The official readme.txt might help

minify-html-markup/minify-html.php 85% from 13 tests

The main PHP file in "Minify HTML" ver. 2.1.9 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("minify-html-markup.php" instead of "minify-html.php")

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
There were no executable files found in this plugin209 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11229209

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin