93% add-html-in-url

Code Review | add .html in URL

WordPress plugin add .html in URL scored 93% from 54 tests.

About plugin

  • Plugin page: add-html-in-url
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.7.3
  • WordPress version: 5.9.2
  • First release: Apr 6, 2017
  • Latest release: Jun 6, 2018
  • Number of updates: 17
  • Update frequency: every 25.0 days
  • Top authors: bgweddingphotography (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 924 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

An overview of server-side resources used by add .html in URL
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0257.27 ▲6.46
Dashboard /wp-admin3.42 ▲0.0134.53 ▲1.23
Posts /wp-admin/edit.php3.66 ▲0.0236.18 ▼0.48
Add New Post /wp-admin/post-new.php6.90 ▼0.0893.46 ▼1,185.97
Media Library /wp-admin/upload.php3.31 ▲0.0123.94 ▼2.38

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for add .html in URL
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4215.90 ▲0.295.94 ▼0.012.67 ▲0.11
Dashboard /wp-admin2,895 ▲406.16 ▼0.16119.11 ▼15.90155.63 ▼8.36
Posts /wp-admin/edit.php2,691 ▼03.23 ▼0.1366.29 ▲0.97153.31 ▲11.91
Add New Post /wp-admin/post-new.php1,668 ▼2218.52 ▼3.41398.46 ▼35.81151.41 ▼4.36
Media Library /wp-admin/upload.php1,695 ▼05.55 ▲0.02133.71 ▼12.17185.47 ▼12.85

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/add-html-in-url/add-html-in-url.php:14

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 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Contributors: The plugin contributors field is missing
  • Contributors: There were no tags found
  • Screenshots: These screenshots do not have images: #1 (Configuring Permalinks), #2 (before this plugin URL), #3 (after this plugin URL)
Please take inspiration from this readme.txt

add-html-in-url/add-html-in-url.php 92% from 13 tests

The principal PHP file in "add .html in URL" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin36 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171036

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png32.97KB10.27KB▼ 68.86%
screenshot-3.png25.24KB7.72KB▼ 69.40%
screenshot-1.png43.26KB17.26KB▼ 60.11%