84% quizy

Code Review | Quizy

WordPress plugin Quizy scored84%from 54 tests.

About plugin

  • Plugin page: quizy
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7
  • WordPress version: 6.3.1
  • First release: May 13, 2017
  • Latest release: May 23, 2017
  • Number of updates: 3
  • Update frequency: every 3.3 days
  • Top authors: lebleut (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,077 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼4.91ms] Passed 4 tests

Server-side resources used by Quizy
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2239.61 ▼0.19
Dashboard /wp-admin3.53 ▲0.2247.36 ▼3.20
Posts /wp-admin/edit.php3.64 ▲0.2847.62 ▼3.24
Add New Post /wp-admin/post-new.php6.11 ▲0.2286.86 ▼12.63
Media Library /wp-admin/upload.php3.45 ▲0.2234.12 ▼0.58
All Quizzes /wp-admin/edit.php?post_type=qzy_quiz3.4935.82
Quizy /wp-admin/options-general.php?page=quizy_settings3.4131.08
Add New /wp-admin/post-new.php?post_type=qzy_quiz3.5856.80
Add New /wp-admin/post-new.php?post_type=qzy_question3.6556.96
Categories /wp-admin/edit-tags.php?taxonomy=quiz_cat&post_type=qzy_quiz3.4434.61
All Questions /wp-admin/edit.php?post_type=qzy_question3.4939.06

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 9 new options
New WordPress options
qzy_default_questions
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
qzy_default_duration
qzy_default_quiz_type

Browser metrics Passed 4 tests

A check of browser resources used by Quizy
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,976 ▲23013.95 ▼0.708.78 ▲7.0839.63 ▼0.65
Dashboard /wp-admin2,268 ▲794.84 ▼1.05107.69 ▲3.3040.98 ▼0.50
Posts /wp-admin/edit.php2,151 ▲592.02 ▼0.0436.04 ▼8.8034.93 ▼1.98
Add New Post /wp-admin/post-new.php1,585 ▲6623.65 ▲0.46642.42 ▲8.1755.99 ▼6.65
Media Library /wp-admin/upload.php1,450 ▲594.25 ▼0.0895.11 ▼4.5244.04 ▼1.62
All Quizzes /wp-admin/edit.php?post_type=qzy_quiz1,1311.9430.9028.16
Quizy /wp-admin/options-general.php?page=quizy_settings8982.0725.0727.42
Add New /wp-admin/post-new.php?post_type=qzy_quiz2,3997.62168.1164.20
Add New /wp-admin/post-new.php?post_type=qzy_question2,3357.68163.9760.41
Categories /wp-admin/edit-tags.php?taxonomy=quiz_cat&post_type=qzy_quiz1,3242.1426.8729.81
All Questions /wp-admin/edit.php?post_type=qzy_question1,1671.9834.8929.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • qzy_default_questions
    • qzy_default_duration
    • widget_recent-posts
    • qzy_default_quiz_type

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/quizy/index.php
    • > /wp-content/plugins/quizy/includes/index.php
    • > /wp-content/plugins/quizy/admin/index.php
    • > /wp-content/plugins/quizy/assets/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: quizzes, evaluation, extensible, tests, shortcode

quizy/quizy.php Passed 13 tests

"Quizy" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
54 characters long description:
Quizy enable you to create awesome Quizzes and tests..

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
Success! There were no dangerous files found in this plugin1,254 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP112871541,115
JavaScript3251379
CSS212360

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity43.33
▷ Minimum class complexity12.00
▷ Maximum class complexity76.00
Average method complexity3.49
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods51
▷ Static methods59.80%
▷ Public methods51100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin