WP Manifestindependent plugin directory
manifest / content / mcq-pro

MCQ-Pro self-updates

Advanced WordPress MCQ Quiz Plugin with Timer and Analytics

by Sweven Solutions · github.com/raihanashrafi/mcq-pro · 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/raihanashrafi/mcq-pro/archive/refs/heads/main.zip

Ships its own WordPress updater (built-in updater), so new versions show up under Dashboard → Updates.

MCQ-Pro - Advanced WordPress Quiz Plugin

Description

MCQ-Pro is a powerful WordPress quiz plugin developed by Sweven Solutions featuring:

  • ✅ Unlimited quizzes and questions
  • ⏱️ Fixed timer with real-time countdown
  • 📊 Progress tracker showing questions answered
  • 📈 Graphical results with Chart.js
  • 🎯 Passing score configuration
  • 📱 Fully responsive design
  • 🎨 Modern, clean interface
  • 🔄 Automatic updates from GitHub

Features

For Administrators:

  • Easy-to-use dashboard for quiz management
  • Add/Edit/Delete quizzes
  • Question management with multiple choice answers
  • Time limit configuration per quiz
  • Passing score percentage settings
  • Detailed results and analytics
  • View all quiz attempts

For Users:

  • Clean quiz interface
  • Fixed timer bar at the bottom showing:
    • Questions answered count
    • Time remaining
    • Progress percentage
  • Navigate between questions
  • Review answers before submission
  • Beautiful results page with:
    • Score percentage
    • Correct/Wrong answers count
    • Time taken
    • Doughnut chart visualization
    • Detailed answer review

Installation

  1. Upload Plugin

    • Upload the mcq-pro folder to /wp-content/plugins/ directory
    • Or install via WordPress dashboard: Plugins → Add New → Upload Plugin
  2. Activate Plugin

    • Go to Plugins in WordPress dashboard
    • Find "MCQ-Pro" and click Activate
    • The plugin will automatically create database tables and a sample quiz
  3. Access Dashboard

    • Navigate to MCQ-Pro in the WordPress admin menu

Usage

Creating a Quiz

  1. Go to MCQ-Pro → Add New Quiz
  2. Fill in:
    • Quiz Title
    • Description (optional)
    • Time Limit (in minutes, 0 for unlimited)
    • Passing Score (percentage)
  3. Click "Create Quiz & Add Questions"

Adding Questions

  1. After creating a quiz, you'll be redirected to the edit page
  2. Click "Add New Question"
  3. Enter the question text
  4. Add 4 answer options
  5. Select the correct answer by clicking the radio button
  6. Click "Save Question"
  7. Repeat for all questions

Displaying Quiz on Frontend

Use the shortcode in any post or page:

[mcq_quiz id="1"]

Replace 1 with your quiz ID (shown in the dashboard).

Settings

Go to MCQ-Pro → Settings to configure:

  • Default time limit
  • Default passing score
  • Show/hide correct answers in results
  • Allow quiz retakes
  • Require user login

Database Tables

The plugin creates 5 tables:

  • wp_mcqpro_quizzes - Quiz information
  • wp_mcqpro_questions - Questions for each quiz
  • wp_mcqpro_answers - Answer options for each question
  • wp_mcqpro_results - Quiz attempt results
  • wp_mcqpro_user_answers - User's answer selections

File Structure

mcq-pro/
├── mcq-pro.php              # Main plugin file
├── includes/
│   ├── class-mcq-pro.php              # Core plugin class
│   ├── class-mcq-pro-loader.php       # Hook loader
│   ├── class-mcq-pro-activator.php    # Activation handler
│   └── class-mcq-pro-deactivator.php  # Deactivation handler
├── admin/
│   ├── class-mcq-pro-admin.php        # Admin functionality
│   ├── css/
│   │   └── mcq-pro-admin.css          # Admin styles
│   ├── js/
│   │   └── mcq-pro-admin.js           # Admin scripts
│   └── partials/
│       ├── dashboard.php              # Quiz list
│       ├── add-quiz.php               # Add new quiz
│       ├── edit-quiz.php              # Edit quiz & questions
│       ├── results.php                # View results
│       └── settings.php               # Plugin settings
├── public/
│   ├── class-mcq-pro-public.php       # Frontend functionality
│   ├── css/
│   │   └── mcq-pro-public.css         # Frontend styles
│   ├── js/
│   │   └── mcq-pro-public.js          # Frontend scripts
│   └── partials/
│       └── quiz-display.php           # Quiz interface
└── README.md

Technical Details

Requirements

  • WordPress 5.0 or higher
  • PHP 7.0 or higher
  • MySQL 5.6 or higher

Technologies Used

  • PHP (WordPress Plugin API)
  • JavaScript (jQuery)
  • Chart.js (for result graphs)
  • CSS3 (modern styling with gradients and animations)
  • AJAX (for smooth quiz interaction)

Hooks & Filters

The plugin uses WordPress hooks:

  • admin_menu - Add admin pages
  • admin_enqueue_scripts - Load admin assets
  • wp_enqueue_scripts - Load frontend assets
  • wp_ajax_* - AJAX handlers
  • init - Register shortcodes

Support & Customization

Customizing Styles

Edit the CSS files:

  • Admin: /admin/css/mcq-pro-admin.css
  • Frontend: /public/css/mcq-pro-public.css

Modifying Timer

Edit /public/js/mcq-pro-public.js - look for the startTimer() function.

Changing Chart Type

Edit /public/js/mcq-pro-public.js - in createResultsChart() function, change type: 'doughnut' to 'bar', 'pie', or 'line'.

Security Features

  • Nonce verification on all AJAX requests
  • Capability checks for admin actions
  • Input sanitization and validation
  • SQL injection prevention with prepared statements
  • XSS protection with proper escaping

Version History

Version 1.0.0

  • Initial release
  • Quiz creation and management
  • Fixed timer with progress tracker
  • Graphical results display
  • Detailed analytics

Author

Sweven Solutions

Updates

This plugin automatically checks for updates from GitHub. When a new version is released, you'll see an update notification in your WordPress admin dashboard, just like official WordPress plugins.

How Updates Work

  1. We release a new version on GitHub
  2. Your WordPress site checks for updates automatically
  3. You see "Update Available" notification
  4. Click "Update Now" - done!

Contributing

Found a bug or want to contribute? Visit our GitHub repository to:

  • Report issues
  • Submit pull requests
  • Request features
  • View source code

License

GPL-2.0+ http://www.gnu.org/licenses/gpl-2.0.txt