94% advanced-quiz

Code Review | Wp-Adv-Quiz

WordPress plugin Wp-Adv-Quiz scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-quiz
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 5.9.2
  • First release: Feb 3, 2022
  • Latest release: Feb 3, 2022
  • Number of updates: 12
  • Update frequency: every 0.2 days
  • Top authors: markusbegerow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 123 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼292.40ms] Passed 4 tests

This is a short check of server-side resources used by Wp-Adv-Quiz
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2456.90 ▲6.17
Dashboard /wp-admin3.73 ▲0.3336.13 ▼3.04
Posts /wp-admin/edit.php3.90 ▲0.2640.25 ▲1.97
Add New Post /wp-admin/post-new.php7.09 ▲0.1295.49 ▼1,173.96
Media Library /wp-admin/upload.php3.68 ▲0.3928.47 ▲5.42
Support & More /wp-admin/admin.php?page=wpAdvQuiz_waq_support3.5623.79
Global settings /wp-admin/admin.php?page=wpAdvQuiz_glSettings3.7830.70
WP-Adv-Quiz /wp-admin/admin.php?page=wpAdvQuiz4.0026.73

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 158 new files
Database: 10 new tables, 2 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

Wp-Adv-Quiz: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,909 ▲15516.48 ▲1.199.51 ▲3.092.59 ▼0.38
Dashboard /wp-admin2,932 ▲746.14 ▼0.06118.82 ▼12.39153.98 ▼10.59
Posts /wp-admin/edit.php2,728 ▲433.24 ▼0.0061.02 ▼1.19138.63 ▼0.95
Add New Post /wp-admin/post-new.php1,690 ▲2916.78 ▲0.02412.02 ▼5.15152.65 ▼2.30
Media Library /wp-admin/upload.php1,736 ▲385.52 ▲0.01140.94 ▲6.22186.96 ▼5.93
Support & More /wp-admin/admin.php?page=wpAdvQuiz_waq_support1,0942.8564.98126.87
Global settings /wp-admin/admin.php?page=wpAdvQuiz_glSettings1,8803.0867.80123.80
WP-Adv-Quiz /wp-admin/admin.php?page=wpAdvQuiz1,7062.9556.26126.76

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 70× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'DPA_Extension' not found in wp-content/plugins/advanced-quiz/lib/plugin/WpAdvQuiz_Plugin_BpAchievementsV3.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WpAdvQuiz_Model_Mapper' not found in wp-content/plugins/advanced-quiz/lib/model/WpAdvQuiz_Model_ToplistMapper.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WpAdvQuiz_Controller_Controller' not found in wp-content/plugins/advanced-quiz/lib/controller/WpAdvQuiz_Controller_Toplist.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WpAdvQuiz_Controller_Controller' not found in wp-content/plugins/advanced-quiz/lib/controller/WpAdvQuiz_Controller_StatisticExport.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WpAdvQuiz_View_View' not found in wp-content/plugins/advanced-quiz/lib/view/WpAdvQuiz_View_QuestionImportPreview.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WpAdvQuiz_View_View' not found in wp-content/plugins/advanced-quiz/lib/view/WpAdvQuiz_View_WaqSupport.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WpAdvQuiz_Model_Mapper' not found in wp-content/plugins/advanced-quiz/lib/model/WpAdvQuiz_Model_QuestionMapper.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WpAdvQuiz_Controller_Controller' not found in wp-content/plugins/advanced-quiz/lib/controller/WpAdvQuiz_Controller_StyleManager.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WpAdvQuiz_Model_Model' not found in wp-content/plugins/advanced-quiz/lib/model/WpAdvQuiz_Model_Toplist.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'WpAdvQuiz_Helper_QuestionExporterInterface' not found in wp-content/plugins/advanced-quiz/lib/helper/WpAdvQuiz_Helper_JsonQuestionExporter.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


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: lead, question, test, score, quiz...

advanced-quiz/wp-adv-quiz.php 85% from 13 tests

Analyzing the main PHP file in "Wp-Adv-Quiz" version 1.0.0
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-quiz.php" instead of "wp-adv-quiz.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin22,859 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity15.76
▷ Minimum class complexity1.00
▷ Maximum class complexity175.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes95100.00%
▷ Final classes00.00%
▷ Static methods535.56%
▷ Public methods71274.63%
▷ Protected methods939.75%
▷ Private methods14915.62%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants918.75%
▷ Class constants3981.25%
▷ Public constants39100.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
39 PNG files occupy 0.33MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
img/hideCorrectQuestion.png15.06KB5.85KB▼ 61.19%
img/quizSummary.png9.56KB3.86KB▼ 59.62%
img/hideAnswerMessageBox.png13.65KB5.49KB▼ 59.75%
img/hideQuestionNumbering.png11.68KB4.65KB▼ 60.15%