SIP, lump sum, SWP, goal and EMI calculators with live results and charts. A visitor fills in a short form, and the result appears as an animated chart.
Status: early development, built from wordpress-plugin-boilerplate. Work is planned in milestones: v1.1.0 brings the calculators as a block and a shortcode. Formulas come from financial-calculators-js.
- Slug and text domain:
wpgenius-financial-calculators - PHP namespace:
WPGenius\CalcWise, prefixcalcwise_, constantsCALCWISE_*
Open CalcWise in WordPress Playground
- To run the plugin: WordPress 6.6 or later and PHP 7.4 or later.
- For development (optional): Composer for the PHP checks and tests,
Node 20.19+ or 22.12+ (
.nvmrc) for the block build and JS/CSS lint, and Docker for the local WordPress site and the integration tests.
WordPress in Docker (mounts this repo as the plugin):
cp .env.example .envdocker compose up -dWordPress runs at http://localhost:8000 and phpMyAdmin at http://localhost:8080.
Change WP_HTTP_PORT / PMA_HTTP_PORT in .env if those ports are taken.
Code checks (Composer and npm are for development tools only):
composer install| Command | What it does |
|---|---|
composer lint |
PHP syntax check |
composer phpcs / composer phpcbf |
WordPress Coding Standards (check / auto-fix) |
composer phpstan |
Static analysis: wrong types, missing methods, unchecked false/WP_Error (level in phpstan.neon.dist) |
composer test |
Unit tests (PHPUnit + Brain Monkey, no WordPress needed) |
npm run env -- start then npm run test:integration |
Integration tests in a real WordPress (wp-env, needs Docker): activation, settings and uninstall. npm run test:integration:multisite runs them as a network. npm run env -- stop when done |
composer make-pot |
Regenerate languages/*.pot |
npm ci |
Install the JS tools |
npm run build / npm start |
Build the blocks into build/ (once / watch) |
npm run lint |
JS and CSS lint |
Commit build/ after changing a block; CI fails if it is out of date.
issue → branch → pull request (Closes #N) → squash merge to main → automatic release → deploy (if enabled)
mainis protected. Changes go through pull requests, merged with squash. Repository admins can still bypass the rules (e.g. a quick edit on GitHub).- Every PR closes an issue (you can switch this off:
bin/setup-github.sh --linked-issue off). The Linked issue check fails a PR whose description has noCloses #N. One request with several changes = one issue per change, delivered in one PR. - CI runs on every PR and must pass before merging: PHP 7.4–8.5 syntax, unit tests, integration tests in WordPress (lowest supported and latest), PHPCS, PHPStan, JS/CSS lint and JS tests, block build, WordPress Plugin Check and the strict pre-submission checks (
bin/presubmit/run.sh --strict). Plugin Check fails whenTested up toinreadme.txtis behind the latest WordPress, so bump it after testing each new WordPress version. - Releases are automatic. On each merge to
main, the Release workflow:- releases only if the plugin zip would change: it compares the package
(everything
.distignoredoesn't exclude) with the last release. Docs, CI and config changes don't release; - bumps the version: patch by default, or minor/major when the PR has the
release:minor/release:majorlabel (release:skipholds a change back until the next release); - writes the changelog and the new version into
readme.txtand the plugin header, and commits that tomain(see the format below); - tags the commit and publishes a GitHub release with the plugin zip
(
releases/latest/download/<slug>.zip).
- releases only if the plugin zip would change: it compares the package
(everything
- Deploys are off by default. See below. When they are on, merging several PRs in a row deploys only the newest release.
The changelog. Each release adds an entry like this to readme.txt:
= 1.2.0 - 2026-12-01 =
* Enhancement: Elementor widget for every calculator
* Fix: The EMI chart keeps its colours in dark themes
* Maintenance: Tested up to WordPress 7.1
- One line per issue the release's PRs closed, using the issue title. Titles are what users read: write them for users, and never name trademarks such as "Gutenberg" (say "block editor").
- Give each issue one type label; the line gets its prefix:
security→ Security,enhancement→ Enhancement,bugorfix→ Fix,maintenance→ Maintenance. Lines are grouped in that order. Don't put the prefix in the title. - Dev-only issues (CI, tooling, tests, docs) get
changelog:skipand stay out.
The Deploy workflow runs after each release while
the repo variable DEPLOY_ENABLED is true. Choose the target with DEPLOY_METHOD:
DEPLOY_METHOD |
Target | Settings (variables / secrets) |
|---|---|---|
ftps |
FTP with TLS (shared hosting) | FTP_PORT, FTP_REMOTE_PATH, FTP_SSL_VERIFY / FTP_HOST, FTP_USERNAME, FTP_PASSWORD |
ssh |
rsync over SSH | SSH_PORT, SSH_REMOTE_PATH, SSH_DELETE / SSH_HOST, SSH_USER, SSH_PRIVATE_KEY, SSH_KNOWN_HOSTS |
wporg |
WordPress.org plugin SVN | WPORG_SLUG / SVN_USERNAME, SVN_PASSWORD (banners and icons go in .wordpress-org/) |
To test the connection without uploading, run Deploy manually from the Actions tab with deploy unticked.
GPL-3.0-or-later. See LICENSE.