Hirun-Dev IQ Test - WordPress Plugin
Culture-fair, Raven's-style 39-question IQ test embeddable as the [iq_test] shortcode, with server-side scoring and admin reporting.
2025-12 • Shipped
Domain: WordPress, Psychometrics, Cognitive Assessment
Tech: WordPress, PHP, JavaScript, MySQL, AJAX
Impact
- Drop-in [iq_test] shortcode delivers a 39-question, 40-minute matrix-reasoning test on any WordPress page.
- Server-side scoring keeps the answer key off the client - it cannot be inspected via DevTools.
- Every attempt is persisted with raw score, IQ band, time taken, IP, UA, and answer JSON for review and CSV export from wp-admin.
Responsibilities
- Designed the test flow, 40-minute countdown with timer-expiry auto-submit, and 1-39 question navigator UI.
- Built the PHP scoring layer that compares submitted answers against an answer key in includes/answer-key.php.
- Implemented the calibrated raw-score-to-IQ lookup mapped to the SD-15 normal distribution, including floor/ceiling bands.
- Created the wp-admin Results page with pagination and CSV export, and a Settings page with an Iris color-picker for the test theme color.
- Provisioned the wp_iq_test_results custom DB table on plugin activation.
Key Features
- [iq_test] shortcode for one-line embed on any page or post
- 39 pre-rendered 3×3 matrix puzzles with 8 multiple-choice option images (A-H) per question
- 40-minute countdown timer with auto-submit on expiry
- Question navigator grid (jump-to / mark-visited) and Finish button for early submission
- Server-side scoring via admin-ajax.php (action: iq_test_submit) - answer key never reaches the browser
- Calibrated score-to-IQ table (mean 100, SD 15) with “< 79” floor and “> 145” ceiling bands
- Result page with bell-curve graphic and a red marker positioned at the user's IQ
- wp-admin Results table with pagination and one-click CSV export
- Configurable theme color via WordPress Iris color-picker (sanitized hex, --iq-bg-color CSS var)
Architecture
- WordPress plugin: shortcode-rendered front end (vanilla HTML/CSS/JS) + PHP scoring layer
- Static PNG asset directory under assets/shapes (qN.png puzzles, aN_x.png options) and assets/normalfordeling/normalfordeling.png curve
- AJAX submission to wp-admin/admin-ajax.php with the iq_test_submit action handler
- Custom wp_iq_test_results table provisioned on activation (user_id, raw, IQ band, numeric IQ, time taken, answers JSON, IP, UA, timestamp)
- Answer key and score-to-IQ lookup kept in includes/answer-key.php so they ship in code and stay version-controlled


