90% wplms-user-generated-quiz

Code Review | WPLMS User Generated Quiz

WordPress plugin WPLMS User Generated Quiz scored90%from 54 tests.

About plugin

  • Plugin page: wplms-user-genera...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.0.2
  • WordPress version: 6.3.1
  • First release: Sep 24, 2017
  • Latest release: Dec 28, 2018
  • Number of updates: 6
  • Update frequency: every 97.2 days
  • Top authors: alexhal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,309 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.46ms] Passed 4 tests

A check of server-side resources used by WPLMS User Generated Quiz
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.11 ▼2.95
Dashboard /wp-admin3.34 ▲0.0444.81 ▼10.38
Posts /wp-admin/edit.php3.39 ▲0.0452.57 ▼3.64
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.47 ▼12.88
Media Library /wp-admin/upload.php3.26 ▲0.0439.15 ▲3.61

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WPLMS User Generated Quiz
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.064.31 ▲1.8539.34 ▼3.65
Dashboard /wp-admin2,206 ▲184.85 ▼1.01112.65 ▼3.8441.91 ▼0.56
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0035.61 ▼1.7730.00 ▼3.27
Add New Post /wp-admin/post-new.php1,533 ▲1923.36 ▲5.86633.55 ▼49.8955.21 ▼9.62
Media Library /wp-admin/upload.php1,388 ▼04.31 ▲0.07100.70 ▼2.4743.90 ▲1.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
6 plugin tags: quiz, user generated quiz, elearning, learning management system, lms...

wplms-user-generated-quiz/wplms-user-generated-quiz.php Passed 13 tests

The main PHP file in "WPLMS User Generated Quiz" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
83 characters long description:
Adds shortcode for mock quiz which user selects tags and creates quiz for himself .

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin232 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12522232

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity5.86
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin