Contents

Performance - Plugixa Easy Social Share Buttons

Share buttons sit on every post, above the fold, for anonymous cached traffic. The plugin is built around one rule: a page loads only what it uses. This page says exactly what that is.

The rule

Before a page is drawn, the plugin works out which placements and which share sets it will show, and enqueues only the files those need.

Page What loads
No buttons Nothing: no stylesheet, no script, no inline style or script
A row of plain links, such as Email and the AI assistants The base stylesheet. No script
A row with a popup network, Copy link, Print or Share The base stylesheet and the script
A floating sidebar or a sticky bar The base stylesheet, one stylesheet part, and the script
A set with the “+” menu Adds the menu’s stylesheet part
A set that shows counts or the total Adds the script, if it was not already needed

A page with no buttons can still carry link preview tags in its head. Those are a few lines of HTML, not a file.

The size of every file

Sizes are gzipped, as measured by the plugin’s build.

Free

File Size Loaded when
Base stylesheet 1.6 KB A page shows share or follow buttons
Script 1.9 KB A button, a placement or counts need it
Floating sidebar part 0.4 KB A set is placed as a floating sidebar
Bar part 0.7 KB A set is placed as a sticky bar or the phone share bar
“+” menu part 0.8 KB A set on the page has the “+” menu
GA4 events script 0.4 KB GA4 events are on, on pages with buttons

The base stylesheet and the script together are 3.5 KB.

Icons are not a file. Only the icons of the networks a page actually draws are printed inline, once, with their brand colours.

Pro PRO

Feature Files Size Loaded when
Pinterest Save button Script and stylesheet 1.2 KB together A single post where the Save button can appear
Quote box Stylesheet 0.4 KB A page with a quote box
Popup and fly-in Script and stylesheet 1.3 KB together A page where a set is placed in a popup or a fly-in
Save this post form Script and stylesheet 1.1 KB together A page where the form is drawn

The Distinctive styles, UTM tags, short links, the placement report and the per-post set choice add no front-end file.

What needs the script

“Popups, Copy link, print, the share sheet and share counts all need the script. Buttons that are plain links need none.”

Choice Needs the script
A network that opens in a popup window Yes
Copy link, Print, Share Yes
Email, the AI assistants, Viber, SMS No
Above or below the content, the product summary, the phone share bar No
A floating sidebar, a sticky bar at the top or bottom Yes
A popup or a fly-in PRO Yes
Share counts or the combined total Yes
The “+” menu, when it offers any destination that needs the script Yes

The wizard’s placement diagram marks each spot’s cost as you choose it, and the Overview screen’s What this costs a visitor card shows the measured total for your configuration, with the reason a script is loaded.

The script is deferred, loaded in the footer, and has no dependencies. It does not use jQuery.

What the script does

It only upgrades what already works:

  • opens a share in a sized popup instead of a new tab
  • copies the link, prints, or opens the device share sheet
  • opens the app directly on touch devices, for networks that have an app link
  • asks each visitor for their Mastodon or Lemmy server, once
  • reveals floating sidebars and the top bar once the reader scrolls down
  • fills in the counts
  • records the click

Without it, every button is still a working link.

No layout shift

  • Buttons are drawn by PHP at their final size.
  • Count slots are reserved before any number arrives. A compact count never takes more than four characters, so a number that lands moves nothing. The full format has no such limit and can widen a slot.
  • The Share button is hidden before the page is first drawn in a browser that has no share sheet, by one inline line in the head, only on pages that show that button.

Behind a page cache

Nothing is decided from the visitor’s device or User-Agent, so one cached response is correct for everyone:

  • Phone and desktop sizes are both in the HTML, and the stylesheet picks one.
  • The phone share bar and the floating sidebars are shown or hidden in CSS.
  • Counts are fetched after the page loads, so a cached page never shows stale numbers baked into its HTML.
  • The public count and click routes use no nonce, which would expire in a cached page.

Counts and your server

Share counts are fetched by a scheduled job on your server, never while a page is being built and never from the visitor’s browser to a network.

  • The job runs hourly and handles up to 40 post and network pairs per run.
  • A count is fresh for six hours.
  • A request times out after five seconds, and a failing service is asked less and less often.

With counts off in every share set, the job does not exist.

Buttons placed where the plugin cannot look ahead

A set in the post being viewed, whether by shortcode, block or Elementor widget, is found before the page is drawn. Its stylesheet goes in the head.

A set in a widget area, a theme template or an Elementor Theme Builder template is drawn after the page’s files were decided. On a page where nothing else from the plugin was planned, its stylesheet is added at the end of the page, which can show the buttons unstyled for a moment on first paint.

On a page that already has a planned placement, such as an automatic spot, the base stylesheet is in the head and there is no such moment.

The Asset loading setting

Settings -> Advanced -> Asset loading has two choices.

Choice What it does
Auto: only what each page needs The default, as described above
Always: every page, every file Wherever the plugin has buttons to draw, it sends the base stylesheet, every stylesheet part and the script, whatever those buttons need

“Switch to always only if an aggressive page cache serves one variant to every visitor.” A page on which no buttons were planned still loads nothing with either choice.

Minified and readable files

The plugin ships each front-end file twice: a minified one, which is what a visitor downloads, and the readable source beside it. With WordPress’s SCRIPT_DEBUG constant on, the share buttons’ readable stylesheet and script are served instead.

The admin

The admin screens are a React application. It loads only on the plugin’s own admin screen and has no effect on your site’s visitors.

What to do next

  • See your own figures on the Overview.
  • Choose placements with their costs in view: Placements.

Quick Links