=== WidgetCalc — Lead-Generating Calculators & ROI Widgets ===
Contributors: rocksoftware
Tags: calculator, lead generation, roi calculator, embed, widget
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn page visitors into leads with an interactive ROI, savings or pricing-quote calculator — no code, free to start.

== Description ==

Most WordPress calculator plugins either need you to write formulas in code, or lock lead capture behind an expensive plan. **WidgetCalc is built the other way round**: build the calculator in a point-and-click editor at [widgetcalc.com](https://widgetcalc.com/go/wp-plugin), publish it, and this plugin drops it onto any page with a shortcode or block — free plan included, no credit card.

A WidgetCalc calculator asks a visitor a few questions (spend, team size, hours spent per week — whatever your calculator needs), shows them a result worth sharing ("You could save €4,200/year"), and captures their email before or after that result so every calculation becomes a lead in your dashboard, not just a number on the page.

= Why WidgetCalc instead of a generic form plugin or a hand-coded script? =

* **No formulas to write.** Build the calculator at widgetcalc.com with a visual editor — fields, a formula built by clicking, and a live preview — then paste one key here. Nothing to code on the WordPress side, ever.
* **The lead capture is built in.** The calculator *is* the lead form; you don't wire up a separate Contact Form 7 or Gravity Forms integration to get the email address.
* **A free plan that actually works.** One calculator, unlimited visitors, no time limit — not a 14-day trial.
* **Light and lazy.** The calculator loads in an iframe after the rest of your page, so it never blocks or slows down your WordPress site's own load.

This plugin puts that calculator on a WordPress site with no code:

* A `[widgetcalc]` shortcode you can drop into any page, post or widget area.
* A WidgetCalc block for the block editor (Gutenberg), with a field for the calculator key.
* A site-wide default calculator key under **Settings → WidgetCalc**, so a single-calculator site needs no attributes at all.

Build your calculator at [widgetcalc.com](https://widgetcalc.com/go/wp-plugin) first (a free plan covers one calculator), copy its key from the publish step, and paste it here.

= Usage =

1. Create and publish a calculator at widgetcalc.com.
2. Copy the calculator key shown on the publish step (the part of the embed snippet between `/embed/` and `.js`).
3. Either:
   * Go to **Settings → WidgetCalc** and paste it as your default key, then add the WidgetCalc block or `[widgetcalc]` shortcode anywhere with no attributes, or
   * Use `[widgetcalc key="your-calculator-key"]` to place a specific calculator, independent of the default.

= Does this need a paid WidgetCalc plan? =

No. The plugin works with WidgetCalc's free plan (one calculator, WidgetCalc badge shown). Paid plans add more calculators, remove the badge and unlock lead routing.

== Installation ==

1. Upload the `widgetcalc` folder to `/wp-content/plugins/`, or install directly from the WordPress plugin directory.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **Settings → WidgetCalc** and paste your calculator key.
4. Add the WidgetCalc block to any page, or use the `[widgetcalc]` shortcode.

== Frequently Asked Questions ==

= Is this really free, or is lead capture locked behind a paid plan? =

The free WidgetCalc plan includes one calculator, unlimited visitors and lead capture with no time limit — the thing most calculator plugins charge for. Paid plans add more calculators, remove the WidgetCalc badge and unlock lead routing (webhooks, more export options); they are not required to get real leads from this plugin.

= Do I need to write a formula or any code? =

No. You build the calculator itself at widgetcalc.com in a visual editor — add fields, build the formula by clicking them together, and see a live preview as you go — then paste the finished calculator's key into this plugin. Nothing here needs code.

= Where do I get a calculator key? =

Build a calculator at widgetcalc.com (or start from a template) and publish it. The publish step shows an embed snippet; the key is the UUID between `/embed/` and `.js` in that snippet.

= Can I embed more than one calculator? =

Yes — set a site-wide default under Settings → WidgetCalc for your main calculator, then use `[widgetcalc key="…"]` with a different key anywhere you want a different one.

= Does this slow down my site? =

The calculator loads in a lazy iframe, after the rest of your page, so it does not block your page's own load.

== External services ==

This plugin loads your calculator from WidgetCalc, the hosted service it is
a shortcut for — it has no function without it.

* **What**: a loader script, `https://widgetcalc.com/embed/{your-calculator-key}.js`,
  requested directly by the visitor's browser for every page that shows a
  `[widgetcalc]` shortcode or WidgetCalc block.
* **When**: on every page view where the shortcode or block is placed.
* **What data is sent**: the calculator key you configured (part of the
  script URL) and the standard request data any script load sends (the
  visitor's IP address and user agent, to the hosting server). The visitor's
  own answers inside the calculator (and an email address, if the
  calculator asks for one) are sent to WidgetCalc only if the visitor fills
  in and submits the calculator; the plugin itself sends nothing on their
  behalf.
* **Provided by**: Rock Software Oy, WidgetCalc — [Terms of Service](https://widgetcalc.com/terms), [Privacy Policy](https://widgetcalc.com/privacy).

== Changelog ==

= 1.0.2 =
* Rewrite the directory listing as a landing page: a sharper title, a "why WidgetCalc" section in the description, and two new FAQ entries (is it really free, do I need to code) answering the two questions a visitor to this listing actually has.
* The admin settings screen now shows a plain "Build a free calculator" button when no key is set yet, linking through a counted redirect so we can see whether an install turns into a signup.

= 1.0.1 =
* Fix: enqueue the embed loader via wp_enqueue_script instead of printing a raw <script> tag.
* Document the WidgetCalc external service (data sent, ToS, privacy) in this readme.
* Remove an unsupported "fastest" claim from the description; add rocksoftware as a listed contributor.

= 1.0.0 =
* First release: shortcode, block and a site-wide default key.

== Screenshots ==

1. Settings → WidgetCalc, with the default calculator key field.
