WP Manifestindependent plugin directory
manifest / forms / wp-partner-integration

Quizerra IQ Integration

Plugin for wordpress

by Quizerra · github.com/quizerra/wp-partner-integration · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/quizerra/wp-partner-integration/archive/refs/heads/main.zip

Readme

Quizerra Partner IQ Integration for WordPress

The official WordPress integration for offering the Quizerra International IQ Test on a partner website. The plugin manages the complete visitor journey on WordPress while keeping the Quizerra API token on the server.

What the plugin provides

  • A 30-question International IQ Test supplied by the Quizerra Partner API.
  • Inline, full-screen popup, and standalone integration options.
  • Local attempt and answer persistence in the WordPress database.
  • Email and age collection after the final answer.
  • A private, shareable result link for every completed test.
  • Free result previews and paid full cognitive reports.
  • Server-side checkout creation and payment status verification.
  • Partner-controlled colors, button text, URL prefixes, and custom CSS.

Requirements

  • WordPress 6.3 or later.
  • PHP 8.1 or later.
  • Pretty permalinks enabled in WordPress.
  • HTTPS on production websites.
  • A Quizerra Partner API token. Request partner access.

Installation

  1. Download the packaged plugin ZIP from the repository release.
  2. In WordPress, open Plugins > Add New Plugin > Upload Plugin.
  3. Upload the ZIP and activate Quizerra IQ Integration.
  4. Open Quizerra IQ in the WordPress administration menu.
  5. Enter the Quizerra API base URL and your Partner API token.
  6. Select a country code, save the settings, and confirm that the connection notice is successful.

The distributed ZIP already contains the PHP SDK and its runtime dependencies. Composer is not required on the production server.

Choose an integration mode

Standalone test URL

Use the standalone URL when your theme, page builder, advertisement, or custom button should link directly to the test:

https://partner.example/iqtest/test/

The test starts immediately after this URL opens. No WordPress page or shortcode is required.

Example HTML:

<a href="/iqtest/test/">Start IQ test</a>

Inline test

Add the following shortcode to a WordPress page or shortcode-compatible page-builder block:

[quizerra_iq_test mode="inline"]

The start button and complete test flow are displayed inside the page content.

Full-screen popup

Add the following shortcode where the start button should appear:

[quizerra_iq_test mode="popup"]

The button opens the test over the current page in a full-screen dialog. Closing and reopening the dialog continues the current attempt.

The settings page displays all available shortcodes and the current standalone URL after a successful API configuration.

Visitor journey

  1. The visitor starts the test.
  2. WordPress requests the questions from Quizerra through the server-side SDK.
  3. Each answer, answer duration, client timestamp, and request context are stored locally and submitted to Quizerra.
  4. After all 30 questions are answered or skipped, the visitor enters an email address and age.
  5. The plugin completes calculation and redirects to a shareable result URL.
  6. The free result is available immediately.
  7. The visitor may create a secure checkout to unlock the full cognitive report.
  8. After payment, the visitor returns to WordPress and the plugin verifies the payment status with Quizerra before displaying paid content.

Public URLs

The default public prefix is iqtest. It can be changed under Quizerra IQ > Technical URLs.

/iqtest/test/
/iqtest/result/?result={shareToken}
/iqtest/payment/success/?result={shareToken}
/iqtest/payment/cancel/?result={shareToken}

Result and payment pages are generated by the plugin. Do not create WordPress pages with the same paths.

The result parameter is a random public share token. It does not contain the email address, IP hash, API token, Quizerra result ID, or the local database ID.

When changing the public prefix on an established site, add redirects from the previous paths so existing result links remain reachable.

Testing the payment flow

Use a Quizerra test environment and test Partner API token. A Stripe test checkout is identifiable by a checkout session that starts with cs_test_. Refer to Stripe test card documentation for the current testing rules and payment scenarios.

  1. Complete a test and open its result URL.
  2. Select Get my full report.
  3. Complete the Stripe test checkout using card number 4242 4242 4242 4242, any future expiry date, and any valid CVC.
  4. Stripe redirects to /iqtest/payment/success/?result={shareToken}.
  5. The plugin asks Quizerra for the authoritative payment status and displays the full report only after Quizerra returns paid.

To inspect the cancel screen, select the back or cancel action in Stripe Checkout. It returns to /iqtest/payment/cancel/?result={shareToken} and keeps the result available.

Opening the success URL manually tests the return page but does not mark a payment as paid. Payment access is never granted from a query parameter or a local database edit. If checkout creates a cs_live_ session, stop and request test payment credentials before entering card details.

Appearance

The settings page provides controls for:

  • Start button label.
  • Primary, accent, text, and background colors.
  • Default shortcode display mode.
  • Optional custom CSS.

Plugin styles use the .qz-iq namespace. Partner themes should scope overrides to that namespace to avoid affecting other WordPress components.

Security and data handling

  • The Partner API token is stored in WordPress options and is never included in frontend HTML or JavaScript.
  • Browser requests are sent to the local WordPress REST API and require a WordPress REST nonce.
  • Attempts are bound to a hashed visitor IP during the active test flow.
  • Question and answer ownership is validated before an answer is stored.
  • Completion requires exactly one stored answer record for every question.
  • Payment status checks are rate-limited and verified server-side through Quizerra.
  • Public result pages expose result information only and are marked noindex,nofollow.

Partners are responsible for publishing an appropriate privacy notice and obtaining any consent required in their jurisdiction for email, age, and assessment data processing.

Developer reference

The plugin uses the public quizerra/php-sdk package for all Quizerra API communication. The browser never calls Quizerra directly.

The default local REST namespace is:

/wp-json/iqtest/v1

The frontend uses these routes internally:

POST /test/start
POST /test/{attemptId}/answer
POST /test/{attemptId}/complete
POST /results/{shareToken}/checkout
GET  /results/{shareToken}/payment-status

These are implementation endpoints for the bundled frontend, not a replacement for the Quizerra Partner API. Custom integrations should use the standalone URL or supported shortcodes unless they intentionally take responsibility for the complete browser flow.

Local records are stored in dedicated WordPress tables created during plugin activation. Database schema upgrades run automatically when the plugin version introduces a new schema.

Development build

Install production dependencies and build the installable ZIP:

composer install --no-dev --optimize-autoloader
bash scripts/build-zip.sh

The artifact is created in dist/. Before opening a pull request, validate PHP and JavaScript syntax and test all three display modes against a Quizerra test environment.

License

This integration is released under the MIT License. Partners may use and adapt the plugin for commercial WordPress websites while retaining the copyright and license notice.

Support

For API credentials, commercial questions, or integration assistance, visit the Quizerra partner page.

Read the full README on GitHub →