83% html-to-shortcode-generator

Code Review | HTML to Shortcode Generator

WordPress plugin HTML to Shortcode Generator scored83%from 54 tests.

About plugin

  • Plugin page: html-to-shortcode...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 30, 2016
  • Latest release: Jun 30, 2016
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: webmediatree5 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,921 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.28ms] Passed 4 tests

Analyzing server-side resources used by HTML to Shortcode Generator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.55 ▼7.83
Dashboard /wp-admin3.33 ▲0.0353.40 ▲3.57
Posts /wp-admin/edit.php3.39 ▲0.0349.71 ▼9.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0588.40 ▼13.87
Media Library /wp-admin/upload.php3.26 ▲0.0337.43 ▲1.86

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for HTML to Shortcode Generator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.28 ▼0.031.57 ▼0.3541.90 ▼0.68
Dashboard /wp-admin2,214 ▲375.57 ▼0.09102.23 ▲12.1552.11 ▲12.16
Posts /wp-admin/edit.php2,116 ▲132.02 ▼0.0838.03 ▼1.7734.63 ▼6.29
Add New Post /wp-admin/post-new.php1,540 ▲1223.16 ▲0.18638.09 ▼42.3158.11 ▼2.57
Media Library /wp-admin/upload.php1,416 ▲134.11 ▼0.0696.58 ▼8.1041.27 ▼7.80

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/html-to-shortcode-generator/html-to-shortcode-generator.php:26

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 88% from 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
These attributes need your attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots do not have images: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png)
You can take inspiration from this readme.txt

html-to-shortcode-generator/html-to-shortcode-generator.php Passed 13 tests

This is the main PHP file of "HTML to Shortcode Generator" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
41 characters long description:
HTML to Shortcode Generator for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin906 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2228132809
JavaScript215295
CSS2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1381.25%
▷ Protected methods00.00%
▷ Private methods318.75%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.44MB with 0.24MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png65.53KB17.38KB▼ 73.47%
assets/screenshot-2.png122.28KB35.96KB▼ 70.59%
assets/screenshot-1.png262.55KB73.34KB▼ 72.07%
(invalid) assets/img/arrow.png0.00KB0.00KB0.00%