78% html-entities-button

Code Review | HTML entities button

WordPress plugin HTML entities button scored 78% from 54 tests.

About plugin

  • Plugin page: html-entities-button
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-5.7.1
  • WordPress version: 5.8.1
  • First release: Nov 29, 2011
  • Latest release: Apr 28, 2021
  • Number of updates: 23
  • Update frequency: every 149.5 days
  • Top authors: tmatsuur (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 4,236 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.11MB] [CPU: ▼178.62ms] Passed 4 tests

A check of server-side resources used by HTML entities button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0136.95 ▼3.96
Dashboard /wp-admin3.07 ▲0.0151.68 ▼5.30
Posts /wp-admin/edit.php3.12 ▲0.0152.44 ▲0.64
Add New Post /wp-admin/post-new.php4.97 ▼0.4688.08 ▼703.08
Media Library /wp-admin/upload.php3.01 ▲0.0137.43 ▼2.13
html entities button /wp-admin/options-general.php?page=html-entities-button2.9633.48

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 1 new option
New WordPress options
html-entities-button-db-version

Browser metrics Passed 4 tests

This is an overview of browser requirements for HTML entities button
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲11216.21 ▲0.318.51 ▼5.4855.85 ▼1.65
Dashboard /wp-admin2,975 ▲476.10 ▲0.05150.38 ▼23.22129.44 ▼4.41
Posts /wp-admin/edit.php2,744 ▲52.83 ▲0.1168.56 ▼7.9897.73 ▼0.37
Add New Post /wp-admin/post-new.php1,624 ▲921.55 ▲0.08306.05 ▲5.18117.22 ▼4.46
Media Library /wp-admin/upload.php1,812 ▲55.02 ▼0.01158.37 ▼12.82128.18 ▼9.69
html entities button /wp-admin/options-general.php?page=html-entities-button1,3602.0966.78114.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • html-entities-button-db-version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=html-entities-button
    • > Notice in wp-content/plugins/html-entities-button/html-entities-button.php+263
    Undefined index: fontSet

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 trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/html-entities-button/html-entities-button.php:83

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Choose HTML entities.), #2 (Choose emoticons.), #3 (Choose recent posts.), #4 (Convert special characters), #5 (Choose wpemoji.), #6 (Entry the font-family.), #7 (Select the font-family and font-size.), #8 (Choose Dashicons.)
You can look at the official readme.txt

html-entities-button/html-entities-button.php Passed 13 tests

Analyzing the main PHP file in "HTML entities button" version 2.2.0
95 characters long description:
HTML entities button is a few inserting HTML entities button add to the admin post/page editor.

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 plugin930 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP142212838
PO File2313192

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity102.00
▷ Minimum class complexity102.00
▷ Maximum class complexity102.00
Average method complexity7.31
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods956.25%
▷ Protected methods00.00%
▷ Private methods743.75%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.20MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-6.png54.27KB16.02KB▼ 70.48%
screenshot-2.png12.65KB5.70KB▼ 54.96%
screenshot-5.png86.78KB25.86KB▼ 70.20%
screenshot-4.png10.70KB5.19KB▼ 51.44%
screenshot-7.png9.93KB4.27KB▼ 56.99%