MCA Price Calculator
Interactive price calculator for WordPress: a shortcode-embeddable estimate widget with a React settings UI, live preview, and fully editable prices, texts, and styles.
by MCA - MediaCreator Agency · github.com/warezor-ua/mca-price-calculator · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/warezor-ua/mca-price-calculator/releases/download/v1.0.0/mca-price-calculator-1.0.0.zipReadme
MCA Price Calculator
A WordPress plugin that renders an interactive price-estimate widget and a full price-list accordion from a single [mca_price_calc] shortcode. Every price, formula parameter, text, and style token is editable from a React settings screen with a live preview, and the widget makes zero external requests at render.
Screenshots
The settings screen, with a live preview that reflects every change before it is saved:

The rendered widget: an interactive estimate and an expandable price list.

Features
Widget
- Live estimate driven by business type, tax system, and employee count, producing an approximate monthly price with a consultation call-to-action.
- Price-list accordion with per-category rows and an animated count-up on the estimate total.
show="both|calc|price"attribute selects the calculator, the price list, or both.- Server-rendered PHP templates with scoped CSS custom properties and a vanilla-JS runtime, so no framework loads on the public page.
- Assets enqueue only on pages that actually use the shortcode.
Admin
- React settings screen with five tabs: Texts, Calculator, Price list, Appearance, and Advanced.
- Live preview that applies style changes instantly and re-renders content server-side for accuracy.
- Drag-sortable price list, plus editable tax systems and formula parameters.
- Style tokens, per-zone overrides, and a custom CSS editor.
- Settings export and import as JSON, and reset to defaults.
- Unsaved-changes guard on the settings screen.
Engineering
- Pure calculation and configuration core with no WordPress coupling, covered by PHPUnit (Brain Monkey) and a jest formula case table.
- REST API (
mca-price-calc/v1) behind themanage_optionscapability and nonce checks, with whitelist sanitization on every write. - Zero external HTTP requests at render, GDPR-clean, no telemetry, no PII.
- Uninstall removes all stored data.
- Fully translatable (POT included).
- WordPress Coding Standards clean, verified in GitHub Actions CI.
Architecture
The plugin keeps a pure logic core separate from a thin WordPress shell. Under src/, Defaults, Schema, Settings, and CssGenerator hold the immutable default configuration, the whitelist sanitizer, the stored-option-over-defaults deep merge, and the scoped CSS custom-property generator. These classes carry no WordPress state and are exercised directly by the unit suite, so the pricing and configuration rules are testable in isolation.
The WordPress-facing shell wires that core onto the platform: Shortcode registers [mca_price_calc] and enqueues the widget assets on demand, RestController exposes the settings and preview routes, Admin delivers the built React app with its boot data, and Preview serves the gated document that the admin iframe renders. WordPress dependencies stay at these edges. On the front end the widget is server-rendered PHP templates plus a small vanilla-JS runtime. The admin app is a React build under admin/.
Requirements
- PHP 8.5 or newer.
- WordPress 7.0 or newer.
- Composer and Node.js are needed only to build from source, not to run the release zip.
Installation
From the release zip
- Download the release zip.
- In the WordPress admin, open Plugins -> Add New -> Upload Plugin, choose the zip, and install it.
- Activate MCA Price Calculator, then add
[mca_price_calc]to any page or post.
From source
composer install --no-dev
npm ci
npm run build
This installs the runtime autoloader and builds the admin app into admin/build.
Development
composer lint # WordPress Coding Standards (phpcs)
composer test # PHPUnit (Brain Monkey)
npm test # jest unit tests
npm run build # build the admin app
License
GPL-2.0-or-later. See LICENSE.
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v1.0.0 | Jul 18, 2026 | mca-price-calculator-1.0.0.zip | 1 |