Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/jorispaarde/energy-label-calulator-php/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Energy Label Calculator (PHP-only)
A minimal, framework-free WordPress plugin that renders an energy label calculator form, computes a label/score in PHP, stores submissions, and provides a basic admin dashboard and a submissions list with CSV export.
Install
- Copy the
energy-label-calculator-php/folder intowp-content/plugins/. - Activate “Energy Label Calculator (PHP)” in WordPress admin.
Usage
- Add the shortcode to a page/post:
[energy_label_calculator_simple]
The form posts to admin-post.php, calculates the result, stores it, and redirects back with a confirmation.
Admin
- Menu: Energielabel → Dashboard / Submissions
- Dashboard shows counts for last 7/30/365 days
- Submissions list is paginated; use “Exporteer CSV” to download data
Data
- Table:
{prefix}_elc_submissionswith fields:id, submission_date, user_ip, user_agent, form_data (JSON), calculated_label, calculated_score.
Development
- All functionality lives in
includes/and simple templates intemplates/. - Scoring is in
includes/class-elc-scoring.php(PHP port of the JS scoring).