74% add-html-after-url

Code Review | Add .html after URL

WordPress plugin Add .html after URL scored74%from 54 tests.

About plugin

  • Plugin page: add-html-after-url
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.4
  • WordPress version: 6.3.1
  • First release: Sep 7, 2020
  • Latest release: Sep 7, 2020
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: nghialuu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /409 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

An overview of server-side resources used by Add .html after URL
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.35 ▼3.32
Dashboard /wp-admin3.31 ▲0.0148.51 ▼0.15
Posts /wp-admin/edit.php3.36 ▲0.0144.62 ▼3.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.80 ▼9.14
Media Library /wp-admin/upload.php3.23 ▲0.0133.10 ▲0.93

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Add .html after URL: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.551.84 ▲0.0443.07 ▲1.80
Dashboard /wp-admin2,206 ▲144.85 ▼0.06110.52 ▼6.2542.40 ▼2.84
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0133.94 ▼4.1134.39 ▲1.62
Add New Post /wp-admin/post-new.php1,535 ▲222.82 ▼0.40656.81 ▼8.2959.29 ▲5.20
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0295.93 ▼7.2145.79 ▲2.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/add-html-after-url/add-html-after-url.php+69
    Undefined property: WP_Rewrite::$page_structure
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/add-html-after-url/add-html-after-url.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: add html after page url, html extension after page url, html after url

add-html-after-url/add-html-after-url.php Passed 13 tests

The principal PHP file in "Add .html after URL" v. 1.0 is loaded by WordPress automatically on each request
109 characters long description:
Plugin is used for rewrite URL by default of page name or post name with new URL add .html at the end of URLs

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin42 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1121842

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin