MCQ-Pro self-updates
Advanced WordPress MCQ Quiz Plugin with Timer and Analytics
by Sweven Solutions · github.com/raihanashrafi/mcq-pro · website
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.zipShips 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
-
Upload Plugin
- Upload the
mcq-profolder to/wp-content/plugins/directory - Or install via WordPress dashboard: Plugins → Add New → Upload Plugin
- Upload the
-
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
-
Access Dashboard
- Navigate to MCQ-Pro in the WordPress admin menu
Usage
Creating a Quiz
- Go to MCQ-Pro → Add New Quiz
- Fill in:
- Quiz Title
- Description (optional)
- Time Limit (in minutes, 0 for unlimited)
- Passing Score (percentage)
- Click "Create Quiz & Add Questions"
Adding Questions
- After creating a quiz, you'll be redirected to the edit page
- Click "Add New Question"
- Enter the question text
- Add 4 answer options
- Select the correct answer by clicking the radio button
- Click "Save Question"
- 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 informationwp_mcqpro_questions- Questions for each quizwp_mcqpro_answers- Answer options for each questionwp_mcqpro_results- Quiz attempt resultswp_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 pagesadmin_enqueue_scripts- Load admin assetswp_enqueue_scripts- Load frontend assetswp_ajax_*- AJAX handlersinit- 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
- Website: https://mcq.com.bd
- GitHub: https://github.com/raihanashrafi/mcq-pro
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
- We release a new version on GitHub
- Your WordPress site checks for updates automatically
- You see "Update Available" notification
- 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