Description
Plugear Conditional Recommendation Flow (formerly Multi Questions Simulator) builds
the kind of quiz or diagnosis that ends with advice: “Which plan suits you?”, “Which
product should you choose?”. Visitors answer one question at a time and then see
the results that fit their answers.
You write the questions and their choices, and you write each result as a normal
post in the block editor. Then you tell each result which answers it is for, and
place the quiz on any page with a block or a shortcode.
Results are chosen by conditions, not by scores
There are no points to balance. For each result you tick, question by question,
the choices it is meant for.
- A result is shown when, for every question with ticks, the visitor picked one
of the ticked choices. Questions without ticks do not matter for that result. - Every matching result is shown, in the order you set. One visitor can get a
recommendation, a coupon and a contact form at once, each written as its own
result. - Results are posts, so they can hold text, images, buttons, embeds and
shortcodes, including Contact Form 7 forms. Blocks and shortcodes that need their
own JavaScript work only if that script is already loaded on the page (Contact
Form 7 forms are set up by the plugin).
Features
- No limit on question sets, results or choices (up to 100 questions per set).
- Reorder the questions of a set by drag and drop.
- Design per question set: color presets, individual colors, border, shadow and
an icon next to the title. The headings and button texts of the quiz can be
changed per set. - A progress bar and a Back button.
- Pages using this set lists the posts and pages that embed a question set.
- Duplicate a question set, a question or a result with one click.
- A Result views count on the question set’s edit screen.
Placing a quiz
Insert the Recommendation Flow block and choose a published question set,
or use the shortcode with the question set’s ID:
[plg_mqs_simulator id="123"]
The optional class attribute adds a CSS class. The question set list shows each
set’s shortcode with a Copy button. Shortcodes and blocks placed with version 1.0
are still displayed (see “Upgrading from 1.0” in the FAQ).
Contact Form 7 inside results
A Contact Form 7 form placed in a result is displayed and sent within the results.
Contact Form 7 6.1 or later is supported (tested with 6.1.7 and 6.2.5). If the
form uses Cloudflare Turnstile, the plugin draws the widget again with the
Turnstile script that Contact Form 7 already loaded; this plugin itself does not
contact Cloudflare. Contact Form 7 is optional.
Privacy
The plugin makes no requests to outside services and sets no cookies. It does not
store answers or anything about visitors. The only thing it records is the Result
views count: a number saved with each question set (post meta
_plg_mqs_result_views) that goes up by one each time its results are shown.
For developers
- Action
plg_mqs_results_shown: fires once right before results are returned,
also when nothing matched, with the question set ID, the answers, the IDs of
the results shown and a context array. - Filters:
plg_mqs_force_enqueue_assets,plg_mqs_result_item_content_classes,
shortcode_atts_plg_mqs_simulator,plg_mqs_template_pathand
plg_mqs_locate_template. - Bubbling DOM events such as
mqs:start,mqs:answerandmqs:afterResults.
The quiz object iswindow.PlgMqsSimulator. - To change the markup, copy a file from
templates/shortcode/to
plg-mqs/shortcode/ in your theme.
Arguments, all events and examples: Hooks and events.
Translations and credits
The plugin’s texts are in English. Translations come as language packs from
translate.wordpress.org; until your language is complete, the admin screens are
in English.
Five title icons (arrow, check, circle, info, question mark) are from
Feather (MIT License) and the stethoscope icon is
from Lucide (ISC License). See the LICENSE file.
Screenshots







Blocks
This plugin provides 1 block.
- Recommendation Flow Places a question set you created on the page.
Installation
- Go to Plugins Add Plugin, search for “Plugear Conditional Recommendation Flow”, then install and activate it.
- Under Recommendation Flow Questions, add your questions, each with at least two choices.
- Under Recommendation Flow Add new, create a question set and add the questions on its Manage questions tab.
- Under Recommendation Flow Content, write a result: choose the question set, tick the choices under Answer condition settings, set the Display order and publish. Repeat for each result.
- Insert the Recommendation Flow block into a page, or paste [plg_mqs_simulator id=”123″].
Coming from Multi Questions Simulator 1.0? See “Upgrading from 1.0” in the FAQ first.
Requires WordPress 7.0 and PHP 8.2 or later. Contact Form 7 is optional (6.2 needs WordPress 7.1 and PHP 8.3).
Building the block from source
The editor script in block/build/ is compiled with
@wordpress/scripts from the
unminified sources in block/src/. To rebuild: npm install && npm run build
FAQ
-
When exactly is a result shown?
-
When the visitor has answered every question, a result is shown if it is
published and assigned to the question set, has at least one tick, and for every
question with ticks the visitor picked a ticked choice.Only published questions of the set count. Ticks on questions removed from the set
or switched to draft are ignored; a result whose ticks are all on such questions
is shown for any answer. A set without published questions is not displayed. -
A result I expected does not appear
-
Usually a question with ticks was not answered. This happens when a page was cached
before you added a question: visitors with the old page cannot answer it. Clear
your page cache after adding questions. -
How many questions can a question set have?
-
Up to 100 published questions. A set with more shows an error message instead
of results.
Choices are unlimited. -
I use a page cache. Anything to watch out for?
-
The results are requested with a security token printed into the page, which
expires after 12 to 24 hours. A page cached for longer shows “A network error
occurred.” instead of results. Keep the cache lifetime under 12 hours or exclude
pages with a quiz. Also clear the cache after adding questions and after updating
this plugin. -
The quiz has no styling when I place it from my theme
-
The assets load only on pages whose own content contains the block or shortcode.
For theme templates, widgets, synced patterns or custom fields, go to
Recommendation Flow Settings
and turn on Load CSS/JS even on pages where the shortcode is not detected. -
The quiz shows for me but not for visitors
-
Visitors see a question set only while it is published without a password.
Draft, pending, private, scheduled and password-protected sets are shown only to
users who can edit them, so that you can preview them. The Shortcode box on
the question set’s edit screen says so while visitors cannot see it. The block
lists published question sets only. -
What happens to pages if I trash a question set?
-
The quiz disappears from the pages that embed it until you restore the set and
publish it again. Check Pages using this set before trashing; it does not see
placements in theme templates, widgets or custom fields. -
What does the Result views count include?
-
Every time the results of the set are shown: also when nothing matched, when a
visitor retakes the quiz, and when you test it while logged in. It counts views,
not people. -
The text settings are empty. How do I get a default text back?
-
Leave a text setting empty (result heading, result count, loading, no results,
restart and back buttons) to use the default text. It is not saved, so it is shown
in the site’s language. Question sets saved with version 1.0 keep the texts that
were filled in at that time; empty a field to go back to the default. -
What happens to my data when I delete the plugin?
-
Nothing is deleted, so a reinstall picks everything up again. To remove your data,
delete the question sets, questions and results permanently (empty the Trash)
before deleting the plugin. A few small settings (options starting with
plg_mqs_) remain. -
Upgrading from 1.0
-
Version 1.0 was called Multi Questions Simulator (shown as 診断シミュレーション on
Japanese sites; foldermulti-questions-simulator). The name and slug have changed, so 1.0 does not
receive this version as an update. Replace it instead; your data is kept:- Back up your database. This version requires WordPress 7.0 and PHP 8.2 or
later. Then deactivate Multi Questions Simulator 1.0 (this does not delete
any data). - Go to Plugins Add Plugin, search for “Plugear Conditional Recommendation
Flow”, install it and activate it. - Open any admin page. This converts your saved data to the new format (only
once). Check that your quizzes are displayed. - Delete Multi Questions Simulator 1.0. It has no uninstall routine, so deleting
it does not delete your data.
- If you activate this plugin while 1.0 is still active, this plugin is the one
that stops, with a notice. Deactivate 1.0, and this plugin runs from the next
page load and converts your data. - Delete 1.0 rather than keeping it deactivated. Reactivating 1.0.1 stops this
plugin, and what you create in 1.0.1 meanwhile is not carried over (1.0 cannot
read the converted data); 1.0.0 cannot be activated next to this plugin. And if another plugin ever takes the old slug on
WordPress.org, it could be offered to 1.0 as an “update”. - The screens are now written in English. Japanese arrives as a language pack
once its translation is approved on translate.wordpress.org; until then,
Japanese sites show the screens in English too. - Shortcodes and blocks in posts and widgets keep working. In theme files, page
builders or custom fields, replace[mqs_simulatorwith[plg_mqs_simulator. - If the editor says the block is not supported, do not delete it or convert it
to HTML; its name is still being switched. Open the editor again later. - Theme template overrides are now looked up in
plg-mqs/. Copy the new bundled
template there and reapply your changes; copying your old one would cause a
fatal error. - Scripts added to results no longer run. Saved scripts are kept.
More, including the renamed hooks and post types: Upgrading from 1.0.
- Back up your database. This version requires WordPress 7.0 and PHP 8.2 or
-
Why does the code still mention `mqs`?
-
mqs is short for the plugin’s former name, Multi Questions Simulator. Existing
sites store their data under names built from it (such as theplg_mqs_prefix),
so they are kept to avoid breaking saved data. The names used by 1.0 are kept in
includes/class-legacy-names.php only to recognize and convert data and
placements from 1.0; nothing is registered or fired under them. CSS classes and
mqs: events keep their names so your own styles and scripts keep working. -
What does the Pro edition add?
-
Plugear Conditional Recommendation Flow Pro adds step-by-step analytics, import
and export, templates, duplicating a question set together with its questions and
results, and a setting that keeps content-based spam filters from blocking forms
sent from results. It uses the same data (Pro 1.2.0 or later).
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Plugear Conditional Recommendation Flow” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Plugear Conditional Recommendation Flow” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.1.2
- Security: question sets that are not published, or have a password, are no
longer shown to visitors on any page and no longer return results to them. Only
users who can edit such a set see it, to preview it. - Added: a note in the Shortcode box of the question set’s edit screen while
visitors cannot see the set.
1.1.1
- Security: admin screens, notices, list columns, filters and AJAX/REST responses
no longer show, count or depend on posts the current user cannot read. - Security: previews, the block editor and other REST/AJAX rendering show only
question sets the current user can read, and the results request accepts only
the question set that the page rendered. - Fixed: saving a question set no longer drops its trashed questions from the order.
1.1.0
- Security: question titles are escaped in the Add question dialog of the
question set editor. A user who can publish questions (such as an Author) could
run a script in the browser of an administrator who opened it (stored XSS). - Changed: the plugin is renamed from Multi Questions Simulator to Plugear
Conditional Recommendation Flow, with the new slug
plugear-conditional-recommendation-flow. Sites on 1.0 replace the plugin
instead of updating it; see “Upgrading from 1.0” in the FAQ. - Changed: internal names use the
plg_mqs_prefix. Saved data is converted once,
when this version first runs. - Changed: the shortcode is
[plg_mqs_simulator id="…"]and the block
plg-mqs/simulator. Existing[mqs_simulator …]shortcodes and blocks in posts
and widgets keep working; blocks are switched to the new name once. - Changed: post meta keys are
_plg_mqs_…(protected meta). Filters, JavaScript
globals, the REST namespace and the AJAX action were renamed, and theme template
overrides moved toplg-mqs/.Plugin::PREFIXwas removed. - Changed: texts are in English; translations come from translate.wordpress.org
and are no longer bundled. - Changed: empty text settings are no longer saved with the default text, so the
default follows the site language. - Fixed: results are built in the site language, even for a logged-in visitor whose
profile language differs. - Removed: the limit of one question set.
- Removed: custom scripts in results no longer run. Saved scripts are kept.
- Removed: the upgrade notice on the question set list and the Analytics box. The
Pro edition is described only on the Upgrade to Pro page in the plugin menu
and by a link in the plugin’s row on the Plugins screen. - Added: duplicating a question set.
- Added: the Result views count on the question set’s edit screen.
- Added: the action
plg_mqs_results_shown. - Added: the block source in
block/src/with build instructions.
Earlier versions are listed in changelog.txt.
