78% quiz-maker

Code Review | Quiz Maker

WordPress plugin Quiz Maker scored78%from 54 tests.

About plugin

  • Plugin page: quiz-maker
  • Plugin version: 6.4.9.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 1, 2016
  • Latest release: Dec 1, 2023
  • Number of updates: 1,355
  • Update frequency: every 2.0 days
  • Top authors: ays-pro (100%)

Code review

54 tests

User reviews

428 reviews

Install metrics

20,000+ active /1,468,712 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲3.64MB] [CPU: ▲21.13ms] 75% from 4 tests

A check of server-side resources used by Quiz Maker
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 3,340.44ms on /wp-admin/admin.php?page=quiz-maker-featured-plugins)
PageMemory (MB)CPU Time (ms)
Home /7.02 ▲3.5562.10 ▲20.68
Dashboard /wp-admin6.96 ▲3.6277.95 ▲16.34
Posts /wp-admin/edit.php7.06 ▲3.7080.94 ▲30.73
Add New Post /wp-admin/post-new.php9.67 ▲3.79113.94 ▲16.75
Media Library /wp-admin/upload.php6.92 ▲3.6971.35 ▲37.71
/wp-admin/admin.php?page=quiz-maker-all-reviews7.0069.79
How to use /wp-admin/admin.php?page=quiz-maker-dashboard7.0174.55
Quizzes /wp-admin/admin.php?page=quiz-maker7.0188.80
PRO Features /wp-admin/admin.php?page=quiz-maker-quiz-features7.0786.66
Questions /wp-admin/admin.php?page=quiz-maker-questions7.0068.99
Integrations /wp-admin/admin.php?page=quiz-maker-integrations7.0969.11
Results /wp-admin/admin.php?page=quiz-maker-results7.0070.64
General Settings /wp-admin/admin.php?page=quiz-maker-settings8.5477.80
Our products /wp-admin/admin.php?page=quiz-maker-featured-plugins7.273,340.44
Question Categories /wp-admin/admin.php?page=quiz-maker-question-categories6.9872.70

Server storage [IO: ▲9.28MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 260 new files
Database: 9 new tables, 11 new options
New tables
wp_aysquiz_themes
wp_aysquiz_categories
wp_aysquiz_rates
wp_aysquiz_reports
wp_aysquiz_questions
wp_aysquiz_quizes
wp_aysquiz_quizcategories
wp_aysquiz_settings
wp_aysquiz_answers
New WordPress options
widget_recent-posts
ays_quiz_sale_btn
ays_quiz_sale_btn_for_two_months
can_compress_scripts
widget_recent-comments
ays_quiz_rate_state
widget_theysaidso_widget
db_upgraded
ays_quiz_db_version
theysaidso_admin_options
...

Browser metrics Passed 4 tests

A check of browser resources used by Quiz Maker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,954 ▲20714.16 ▼0.551.67 ▼0.1119.07 ▼25.80
Dashboard /wp-admin2,360 ▲1835.70 ▲0.0794.42 ▲0.1577.33 ▲30.80
Posts /wp-admin/edit.php2,181 ▲811.97 ▲0.0238.77 ▼0.7639.09 ▲0.88
Add New Post /wp-admin/post-new.php1,565 ▲3920.61 ▼2.63768.88 ▲119.0038.40 ▼11.36
Media Library /wp-admin/upload.php1,469 ▲754.21 ▲0.04106.03 ▲8.9472.43 ▲29.76
/wp-admin/admin.php?page=quiz-maker-all-reviews2,5305.59128.09174.63
How to use /wp-admin/admin.php?page=quiz-maker-dashboard2,81511.59344.61184.22
Quizzes /wp-admin/admin.php?page=quiz-maker3,15112.23335.63180.47
PRO Features /wp-admin/admin.php?page=quiz-maker-quiz-features3,3945.3881.51151.64
Questions /wp-admin/admin.php?page=quiz-maker-questions2,6255.5486.24145.31
Integrations /wp-admin/admin.php?page=quiz-maker-integrations2,8885.5183.90149.65
Results /wp-admin/admin.php?page=quiz-maker-results2,5535.4885.42112.40
General Settings /wp-admin/admin.php?page=quiz-maker-settings10,8116.96223.13133.49
Our products /wp-admin/admin.php?page=quiz-maker-featured-plugins1,7995.4979.33121.52
Question Categories /wp-admin/admin.php?page=quiz-maker-question-categories2,1595.3884.70139.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • ays_quiz_mega_bundle_banner_time
    • ays_quiz_sale_btn_for_two_months
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • ays_quiz_sale_btn
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • ays_quiz_rate_state

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/quiz-maker/public/partials/quiz-maker-public-display.php
    • > /wp-content/plugins/quiz-maker/admin/partials/subscribe/quiz-maker-subscribe-email-display.php
  • 39× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/quiz-maker/admin/partials/features/quiz-maker-features-display.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/quiz-maker/admin/partials/quizes/actions/quiz-maker-quizes-actions.php:13
    • > PHP Warning
      Use of undefined constant AYS_QUIZ_ADMIN_URL - assumed 'AYS_QUIZ_ADMIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/quiz-maker/admin/partials/questions/quiz-maker-question-categories-display.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'Quiz_Maker_Public' not found in wp-content/plugins/quiz-maker/public/partials/class-quiz-theme-rect-light.php:31
    • > PHP Warning
      Use of undefined constant AYS_QUIZ_ADMIN_URL - assumed 'AYS_QUIZ_ADMIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/quiz-maker/admin/partials/quizes/quiz-maker-quiz-categories-display.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/quiz-maker/includes/lists/class-quiz-maker-results-list-table.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/quiz-maker/includes/lists/class-quiz-maker-quizes-list-table.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader-skin.php' (include_path='.:/usr/share/php') in wp-content/plugins/quiz-maker/includes/admin/class-quiz-maker-install-skin.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Quiz_Maker_Public' not found in wp-content/plugins/quiz-maker/public/partials/class-quiz-theme-elegant-dark.php:31
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/quiz-maker/admin/partials/results/quiz-maker-all-reviews-display.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: exam, questionnaire, quiz, test, education...

quiz-maker/quiz-maker.php Passed 13 tests

This is the main PHP file of "Quiz Maker" version 6.4.9.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
55 characters long description:
This plugin allows you make unlimited number of quizes.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected82,545 lines of code in 148 files:
LanguageFilesBlank linesComment linesLines of code
PHP525,0273,64134,329
PO File99,51616,84322,511
JavaScript241,28483511,606
CSS231,7732,31111,091
SVG38012,867
JSON200141

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,520)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 698)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity142.76
▷ Minimum class complexity1.00
▷ Maximum class complexity1,520.00
Average method complexity8.43
▷ Minimum method complexity1.00
▷ Maximum method complexity698.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes00.00%
Methods553
▷ Static methods8815.91%
▷ Public methods50090.42%
▷ Protected methods468.32%
▷ Private methods71.27%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
69 compressed PNG files occupy 0.50MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/correct-style-6.png1.47KB1.46KB0.07%
admin/images/integrations/zapier_logo.png0.57KB0.57KB0.00%
admin/images/icons/user2.png0.52KB0.52KB0.19%
public/images/wrong-style-2.png0.46KB0.46KB0.00%
public/images/wrong-style-10.png2.00KB1.93KB▼ 3.90%