Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/merkushin/inkmeter/releases/download/v1.0.0/inkmeter.zipInkmeter
Adds a panel and shows your current writing streak.
Built on merkushin/wpal.
Development
Requirements: PHP 7.4+, Composer 2, Node.js 20.9+, WP-CLI (for translations).
make install # composer install && npm ci
make build-js # build assets into assets/dist
make test # run PHPUnit
make smoke # smoke test the release build from make dist
make lint # WordPress Coding Standards and PHP 7.4+ compatibility (make lint-fix to auto-fix)
CI (.github/workflows/ci.yml) runs the linter, checks that languages/inkmeter.pot is up to date and that versions match, runs the tests on PHP 7.4–8.4, builds the plugin (uploaded as the inkmeter artifact) and runs Plugin Check on the build.
In a development checkout the plugin loads vendor/autoload.php, so it can be symlinked into a local WordPress install as-is.
Translations
All user-facing text lives in src/views/ and uses the inkmeter text domain. The plugin ships no translation files: WordPress.org asks plugins to translate through translate.wordpress.org, and WordPress downloads and loads those language packs automatically.
languages/ holds the template (inkmeter.pot) and draft .po files for de_DE, es_ES, fr_FR, it_IT, ja, nl_NL, pl_PL, pt_BR, pt_PT, ru_RU, tr_TR, uk and zh_CN. They are not part of the release; they can be imported into translate.wordpress.org once the plugin is approved.
After changing strings, regenerate the template and merge it into every .po file (needs WP-CLI):
make i18n
Building a release
make dist
This creates inkmeter.zip. The build happens in build/inkmeter, so the working copy is left untouched:
- Plugin files and built assets are copied to
build/inkmeter. - Runtime dependencies are installed there.
bin/prune-wpal.phpfinds the wpal services used insrc/(use Merkushin\Wpal\Service\…andServiceFactory::create_…()) and tells wp-scoper to copy only those plusServiceFactory; wpal's PHP 8.4+ Api layer is always left out. The build fails ifsrc/references a service wpal doesn't have. - Dependencies are prefixed with wp-scoper into
vendor-prefixed/(namespaceMerkushin\Inkmeter\Vendor), and theusestatements insrc/are rewritten to match. vendor/and the Composer files are removed and the directory is zipped.
make smoke then loads the build with stubbed WordPress functions and runs every code path, so a wpal class missing from the build fails CI rather than a site. Using a new wpal service needs no configuration: reference it in src/ and the next build includes it.
vendor-prefixed/ is never committed. The wp-scoper Composer plugin is disabled in composer.json (allow-plugins) so it doesn't rewrite the sources on composer install; it only runs from make dist.
Releasing
- Bump the version in
inkmeter.php(header),readme.txt(Stable tag),Plugin::VERSIONandpackage.json, and add a changelog entry toreadme.txt.make version-checkconfirms they match. - Push a tag with that version, e.g.
v1.0.1. The release workflow builds the zip, deploys it to WordPress.org SVN with the listing assets from.wordpress-org/, and creates a GitHub release with the zip attached.
The workflow needs the SVN_USERNAME and SVN_PASSWORD repository secrets (your WordPress.org username and SVN password). The very first version is submitted by hand at wordpress.org/plugins/developers/add; tags only deploy after the plugin is approved.
Releases
1 release. Each count is every asset in that release; expand a row for the breakdown.