83% html-suffix

Code Review | html suffix

WordPress plugin html suffix scored83%from 54 tests.

About plugin

  • Plugin page: html-suffix
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Dec 28, 2017
  • Latest release: Dec 28, 2017
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: nasirul (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /565 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.05MB] [CPU: ▼4.01ms] Passed 4 tests

Analyzing server-side resources used by html suffix
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.22 ▼4.28
Dashboard /wp-admin3.35 ▲0.0543.17 ▼5.71
Posts /wp-admin/edit.php3.46 ▲0.1145.52 ▼0.68
Add New Post /wp-admin/post-new.php5.95 ▲0.0787.32 ▼5.38
Media Library /wp-admin/upload.php3.27 ▲0.0535.53 ▲5.19

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for html suffix
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲14113.85 ▼0.535.31 ▲3.4243.40 ▼0.17
Dashboard /wp-admin2,213 ▲645.85 ▲0.22107.35 ▲10.4441.91 ▼2.33
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0739.68 ▲3.9435.91 ▲5.89
Add New Post /wp-admin/post-new.php1,518 ▼1523.17 ▲0.07641.55 ▲4.3755.24 ▲1.56
Media Library /wp-admin/upload.php1,386 ▲44.21 ▲0.0195.14 ▲0.0542.22 ▲2.25

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/html-suffix/admin/partials/html_suffix-admin-display.php
    • > /wp-content/plugins/html-suffix/public/partials/html_suffix-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Change your permalink and put this " .html " after permalink), #2 (Url Demo in [Demo](https://bdcodemaker.com/demo/plugin/animcat/html-suffix.html) site)
You can look at the official readme.txt

html-suffix/html_suffix.php 85% from 13 tests

The principal PHP file in "html suffix" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: The principal plugin file should be the same as the plugin slug ("html-suffix.php" instead of "html_suffix.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
Good job! No executable or dangerous file extensions detected182 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12120526176
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.29
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.09
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png24.89KB13.11KB▼ 47.32%