89% lightweight-html-minify

Code Review | Lightweight HTML Minify

WordPress plugin Lightweight HTML Minify scored 89% from 54 tests.

About plugin

  • Plugin page: lightweight-html-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 16, 2018
  • Latest release: Feb 18, 2018
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: gchoyal1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 855 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by Lightweight HTML Minify
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.89 ▼0.43
Dashboard /wp-admin3.32 ▲0.0244.41 ▼0.36
Posts /wp-admin/edit.php3.42 ▲0.0647.50 ▼2.78
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.96 ▼17.19
Media Library /wp-admin/upload.php3.25 ▲0.0132.86 ▼2.22

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

Browser metrics Passed 4 tests

Lightweight HTML Minify: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,777 ▲2013.29 ▼1.091.86 ▼0.3439.35 ▼7.80
Dashboard /wp-admin2,203 ▲124.98 ▼0.90110.46 ▲0.4540.51 ▼2.56
Posts /wp-admin/edit.php1,991 ▼1012.02 ▲0.0240.18 ▼0.2636.12 ▼0.75
Add New Post /wp-admin/post-new.php1,533 ▲1323.32 ▲0.34584.17 ▼134.5954.29 ▼7.66
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0496.42 ▼6.8943.33 ▲1.58

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: html compression, lightweight, lightweight html minify, minify, html

lightweight-html-minify/plugin.php 85% from 13 tests

The main PHP script in "Lightweight HTML Minify" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 177 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lightweight-html-minify.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin127 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12318127

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods350.00%
▷ Protected methods350.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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 were not PNG files found in your plugin