83% quiz-by-categories

Code Review | Quiz By Categories

WordPress plugin Quiz By Categories scored83%from 54 tests.

About plugin

  • Plugin page: quiz-by-categories
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4.1
  • WordPress version: 6.3.1
  • First release: Sep 3, 2020
  • Latest release: Oct 26, 2020
  • Number of updates: 9
  • Update frequency: every 6.1 days
  • Top authors: carlsansfa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /374 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.96ms] Passed 4 tests

Server-side resources used by Quiz By Categories
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0342.83 ▼1.91
Dashboard /wp-admin3.34 ▲0.0451.02 ▼6.26
Posts /wp-admin/edit.php3.39 ▲0.0353.08 ▼1.12
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.31 ▼6.56
Media Library /wp-admin/upload.php3.26 ▲0.0341.17 ▲3.58

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 20 new files
Database: 4 new tables, 6 new options
New tables
wp_csqsmusertoken
wp_csqsmquiz
wp_csqsmreponsesuite
wp_csqsmsuitequiz
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Quiz By Categories
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.031.88 ▼0.2643.08 ▼1.24
Dashboard /wp-admin2,198 ▲215.62 ▼0.0389.15 ▼5.7840.80 ▲0.84
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0135.34 ▼3.7235.98 ▲3.05
Add New Post /wp-admin/post-new.php1,531 ▲523.07 ▼0.24685.52 ▲59.7953.30 ▲3.57
Media Library /wp-admin/upload.php1,403 ▲64.24 ▲0.0599.90 ▼4.2340.02 ▼6.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/quiz-by-categories/quizshortcode.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quiz-by-categories/quiz.php:17

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 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (User view), #2 (Admin/Editor view)
The official readme.txt is a good inspiration

quiz-by-categories/quiz.php 85% from 13 tests

The primary PHP file in "Quiz By Categories" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("quiz-by-categories.php" instead of "quiz.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("2.5" instead of "4.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,533 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10199861,141
CSS13720258
PO File1313184
JavaScript16041
HTML1209

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions53
▷ Named functions53100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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