83% html-social-share-buttons

Code Review | Html Social share buttons

WordPress plugin Html Social share buttons scored 83% from 54 tests.

About plugin

  • Plugin page: html-social-share...
  • Plugin version: 2.1.16
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Nov 10, 2013
  • Latest release: Oct 4, 2022
  • Number of updates: 108
  • Update frequency: every 30.1 days
  • Top authors: alimuzzamanalim (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

100+ active / 23,280 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼0.94ms] Passed 4 tests

Server-side resources used by Html Social share buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2952.33 ▲5.68
Dashboard /wp-admin3.59 ▲0.2946.24 ▼3.99
Posts /wp-admin/edit.php3.64 ▲0.2847.23 ▼2.45
Add New Post /wp-admin/post-new.php6.11 ▲0.2395.68 ▼1.28
Media Library /wp-admin/upload.php3.45 ▲0.2238.05 ▲3.95

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 96 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_html_share_button_widget

Browser metrics Passed 4 tests

Html Social share buttons: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7413.31 ▼1.061.71 ▼0.3845.04 ▲1.39
Dashboard /wp-admin2,221 ▲304.87 ▼1.01101.26 ▼11.3638.41 ▼2.32
Posts /wp-admin/edit.php2,101 ▲92.01 ▲0.0034.22 ▼7.4131.27 ▼5.89
Add New Post /wp-admin/post-new.php6,483 ▲4,94023.29 ▲5.28937.31 ▲305.5953.39 ▲0.14
Media Library /wp-admin/upload.php1,400 ▲124.16 ▼0.0193.84 ▼6.4740.92 ▲0.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_html_share_button_widget
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/html-social-share-buttons/filters.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html-social-share-buttons/settings_page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/html-social-share-buttons/html-social-share.php:14
    • > PHP Fatal error
      Uncaught Error: Class '__iconset_parent_class' not found in wp-content/plugins/html-social-share-buttons/iconset/default/ssb.php:11
    • > PHP Fatal error
      Uncaught Error: Class '__iconset_parent_class' not found in wp-content/plugins/html-social-share-buttons/iconset/flat/ssb.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html-social-share-buttons/vc-integration.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/html-social-share-buttons/shortcode.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/html-social-share-buttons/metabox.php:10
    • > PHP Fatal error
      Uncaught Error: Class '__iconset_parent_class' not found in wp-content/plugins/html-social-share-buttons/iconset/prajin/ssb.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html-social-share-buttons/widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

html-social-share-buttons/html-social-share.php 77% from 13 tests

The primary PHP file in "Html Social share buttons" version 2.1.16 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("html-social-share-buttons.php" instead of "html-social-share.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 158 characters long)

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
Good job! No executable or dangerous file extensions detected1,819 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP162081671,211
CSS74916479
JavaScript2172169
PO File1212560

PHP code Passed 2 tests

An short overview of 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.29
Average class complexity9.57
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods65
▷ Static methods11.54%
▷ Public methods6498.46%
▷ Protected methods11.54%
▷ Private methods00.00%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
63 PNG files occupy 0.35MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
iconset/prajin/preview.png5.97KB3.46KB▼ 41.97%
iconset/flat/square/Linkedin.png0.44KB0.47KB0.00%
assets/setting.png23.73KB1.00KB▼ 95.78%
iconset/long_shadow/circle/google_+.png2.58KB2.57KB0.27%
iconset/prajin/square/linkedin.png2.94KB2.41KB▼ 17.98%