84% insert-html-snippet

Code Review | Insert Html Snippet

WordPress plugin Insert Html Snippet scored84%from 54 tests.

About plugin

  • Plugin page: insert-html-snippet
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Aug 16, 2012
  • Latest release: Oct 26, 2023
  • Number of updates: 44
  • Update frequency: every 92.9 days
  • Top authors: f1logic (100%)

Code review

54 tests

User reviews

219 reviews

Install metrics

20,000+ active /447,412 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.33ms] Passed 4 tests

Analyzing server-side resources used by Insert Html Snippet
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0940.72 ▲2.71
Dashboard /wp-admin3.40 ▲0.0950.31 ▲3.83
Posts /wp-admin/edit.php3.51 ▲0.1545.64 ▲1.66
Add New Post /wp-admin/post-new.php6.00 ▲0.1182.18 ▼5.75
Media Library /wp-admin/upload.php3.32 ▲0.0934.52 ▲0.05
HTML Snippets /wp-admin/admin.php?page=insert-html-snippet-manage3.3734.60
About /wp-admin/admin.php?page=insert-html-snippet-about3.3333.69
Suggest a Feature /wp-admin/admin.php?page=insert-html-snippet-suggest-features3.3431.38
Settings /wp-admin/admin.php?page=insert-html-snippet-settings3.3131.86

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 42 new files
Database: 1 new table, 14 new options
New tables
wp_xyz_ihs_short_code
New WordPress options
xyz_ihs_dismiss
db_upgraded
xyz_ihs_limit
can_compress_scripts
xyz_ihs_sort_order
xyz_ihs_premium_version_ads
widget_recent-comments
xyz_credit_link
widget_xyz_insert_html_widget
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for Insert Html Snippet
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲4114.35 ▲0.001.64 ▼0.1147.23 ▲6.43
Dashboard /wp-admin2,218 ▲385.79 ▲0.1194.96 ▲11.1378.61 ▲39.02
Posts /wp-admin/edit.php2,138 ▲382.03 ▲0.0536.23 ▲1.9631.33 ▼5.43
Add New Post /wp-admin/post-new.php1,712 ▲18122.10 ▼1.03727.62 ▲46.8956.64 ▼0.72
Media Library /wp-admin/upload.php1,441 ▲414.28 ▲0.0992.67 ▼23.4774.84 ▲26.48
HTML Snippets /wp-admin/admin.php?page=insert-html-snippet-manage1,2221.7125.2347.03
About /wp-admin/admin.php?page=insert-html-snippet-about1,5221.6723.1938.69
Suggest a Feature /wp-admin/admin.php?page=insert-html-snippet-suggest-features1,1231.7025.0331.77
Settings /wp-admin/admin.php?page=insert-html-snippet-settings1,2571.8324.2432.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • xyz_ihs_premium_version_ads
    • xyz_credit_link
    • widget_xyz_insert_html_widget
    • xyz_ihs_dismiss
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/insert-html-snippet/admin/admin-notices.php:67

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
The official readme.txt might help

insert-html-snippet/insert-html-snippet.php 92% from 13 tests

The entry point to "Insert Html Snippet" version 1.3.4 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 242 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected2,308 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP223111541,798
CSS11433498
JavaScript13012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
17 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png0.51KB0.53KB0.00%
images/twitter.png0.98KB0.85KB▼ 13.70%
images/orange_buynow.png4.92KB2.67KB▼ 45.76%
images/edit.png3.18KB2.07KB▼ 34.91%
images/new_star.png4.65KB1.93KB▼ 58.47%