79% mcq-test

Code Review | Multiple Choice Question

WordPress plugin Multiple Choice Question scored79%from 54 tests.

About plugin

  • Plugin page: mcq-test
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 17, 2016
  • Latest release: Nov 10, 2017
  • Number of updates: 10
  • Update frequency: every 48.7 days
  • Top authors: jaedm97 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,905 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.91ms] Passed 4 tests

A check of server-side resources used by Multiple Choice Question
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1440.06 ▼4.96
Dashboard /wp-admin3.44 ▲0.1449.72 ▲1.32
Posts /wp-admin/edit.php3.56 ▲0.2050.48 ▲0.30
Add New Post /wp-admin/post-new.php6.02 ▲0.1482.72 ▼12.29
Media Library /wp-admin/upload.php3.34 ▲0.1135.09 ▲2.00
Add New /wp-admin/post-new.php?post_type=question3.4247.98
All Given Tests /wp-admin/edit.php?post_type=given_test3.4139.72
Add New /wp-admin/post-new.php?post_type=participant3.4046.02
All Questions /wp-admin/edit.php?post_type=question3.4139.73
Settings /wp-admin/admin.php?page=mcq_menu_settings3.4736.34
Question Categories /wp-admin/edit-tags.php?taxonomy=question_cat&post_type=question3.3637.86
All Participants /wp-admin/edit.php?post_type=participant3.4143.57

Server storage [IO: ▲1.05MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Multiple Choice Question
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,161 ▲42615.16 ▲0.776.94 ▲5.1737.33 ▼2.14
Dashboard /wp-admin2,438 ▲2536.45 ▲0.63127.32 ▲23.9840.58 ▼2.47
Posts /wp-admin/edit.php2,344 ▲2553.38 ▲1.3848.16 ▲8.3929.15 ▼7.15
Add New Post /wp-admin/post-new.php1,596 ▲6823.51 ▲5.42705.44 ▲104.7937.27 ▼11.57
Media Library /wp-admin/upload.php1,487 ▲1024.39 ▲0.2084.32 ▼15.2041.67 ▼2.84
Add New /wp-admin/post-new.php?post_type=question1,8323.7370.5245.48
All Given Tests /wp-admin/edit.php?post_type=given_test1,3123.4142.7426.05
Add New /wp-admin/post-new.php?post_type=participant1,8583.6467.4535.37
All Questions /wp-admin/edit.php?post_type=question1,3503.3945.2129.94
Settings /wp-admin/admin.php?page=mcq_menu_settings1,1193.1138.5428.40
Question Categories /wp-admin/edit-tags.php?taxonomy=question_cat&post_type=question1,5243.2140.4427.83
All Participants /wp-admin/edit.php?post_type=participant1,3093.4043.2926.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/mcq-test/templates/import_questions.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mcq-test/templates/single-others.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/mcq-test/templates/single-question/options.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mcq-test/templates/mcq-test.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/mcq-test/templates/single-question/related.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mcq-test/templates/single-question/buttons.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 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
There were no plugin tags found

mcq-test/mcq-test.php Passed 13 tests

Analyzing the main PHP file in "Multiple Choice Question" version 1.2.1
45 characters long description:
This is a plug-in for Managing a MCQ webapps.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin8,203 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
CSS9297604,801
PHP266452231,741
JavaScript53189691,006
SVG100655

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity16.30
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods43
▷ Static methods00.00%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
resources/front/images/coming-soon.png7.66KB4.62KB▼ 39.74%