83% add-html-in-url

Code Review | add .html in URL

WordPress plugin add .html in URL scored83%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: 6.3.1
  • 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

10+ active /1,133 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.61ms] Passed 4 tests

An overview of server-side resources used by add .html in URL
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0140.45 ▲1.63
Dashboard /wp-admin3.35 ▼0.0357.36 ▼7.78
Posts /wp-admin/edit.php3.40 ▲0.0148.13 ▲2.17
Add New Post /wp-admin/post-new.php5.93 ▲0.0183.65 ▼9.06
Media Library /wp-admin/upload.php3.27 ▲0.0134.94 ▼3.21

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: no files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for add .html in URL
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.101.77 ▲0.1742.09 ▲1.25
Dashboard /wp-admin2,206 ▲184.88 ▼0.98113.39 ▲12.4742.28 ▼0.81
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0134.63 ▼2.6833.13 ▼3.13
Add New Post /wp-admin/post-new.php1,544 ▲2523.13 ▼0.11682.06 ▲1.2264.04 ▲3.86
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.0197.03 ▼8.9041.94 ▼3.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Configuring Permalinks), #2 (before this plugin URL), #3 (after this plugin URL)
  • Contributors: Plugin contributors not specified
  • Contributors: There were no tags found
Please take inspiration from this readme.txt

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

This is the main PHP file of "add .html in URL" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected36 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171036

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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-1.png43.26KB17.26KB▼ 60.11%
screenshot-3.png25.24KB7.72KB▼ 69.40%
screenshot-2.png32.97KB10.27KB▼ 68.86%