94% html-shortcodes

Code Review | HTML Shortcodes

WordPress plugin HTML Shortcodes scored 94% from 54 tests.

About plugin

  • Plugin page: html-shortcodes
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 5.8.1
  • First release: Mar 1, 2018
  • Latest release: Mar 5, 2018
  • Number of updates: 9
  • Update frequency: every 2.9 days
  • Top authors: jhoylman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 537 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
Install script ran successfully

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

This is a short check of server-side resources used by HTML Shortcodes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0132.13 ▼1.80
Dashboard /wp-admin3.08 ▲0.0245.81 ▲1.51
Posts /wp-admin/edit.php3.13 ▲0.0145.91 ▲2.11
Add New Post /wp-admin/post-new.php5.44 ▲0.0092.89 ▼557.64
Media Library /wp-admin/upload.php3.02 ▲0.0132.57 ▼0.42

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

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

Browser metrics Passed 4 tests

A check of browser resources used by HTML Shortcodes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8416.05 ▲0.4010.52 ▲0.5650.71 ▲0.70
Dashboard /wp-admin2,973 ▲395.89 ▼0.05141.45 ▼2.73108.70 ▼16.30
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0167.32 ▲4.1496.89 ▲8.63
Add New Post /wp-admin/post-new.php1,500 ▼17618.55 ▼0.22371.01 ▲17.37111.71 ▲1.18
Media Library /wp-admin/upload.php1,748 ▼624.99 ▼0.06152.78 ▲7.64124.16 ▲3.55

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
Uninstall script ran successfully

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/html-shortcodes/html_shortcode.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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
2 plugin tags: html, shortcode

html-shortcodes/html_shortcode.php 85% from 13 tests

The main PHP file in "HTML Shortcodes" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("html-shortcodes.php" instead of "html_shortcode.php")

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
No dangerous file extensions were detected49 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1203449

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected