83% random-quiz-addon-for-lifterlms

Code Review | Random Quiz Generator for LifterLMS

WordPress plugin Random Quiz Generator for LifterLMS scored83%from 54 tests.

About plugin

  • Plugin page: random-quiz-addon...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Oct 27, 2020
  • Latest release: Sep 16, 2022
  • Number of updates: 17
  • Update frequency: every 40.7 days
  • Top authors: aspengrovestudios (70.59%)kurowskanna (23.53%)annaqq (17.65%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,514 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Random Quiz Generator for LifterLMS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.27 ▲4.54
Dashboard /wp-admin3.34 ▲0.0443.71 ▼3.49
Posts /wp-admin/edit.php3.39 ▲0.0344.33 ▼0.73
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.61 ▼13.57
Media Library /wp-admin/upload.php3.26 ▲0.0333.78 ▲1.00

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Random Quiz Generator for LifterLMS
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▼0.221.72 ▲0.2143.43 ▲2.54
Dashboard /wp-admin2,197 ▲175.59 ▼0.0383.89 ▼4.4135.83 ▼9.14
Posts /wp-admin/edit.php2,099 ▼11.96 ▼0.0634.21 ▼1.9334.85 ▲1.06
Add New Post /wp-admin/post-new.php1,551 ▲1422.95 ▲4.94636.94 ▲23.1658.96 ▲1.58
Media Library /wp-admin/upload.php1,402 ▲24.22 ▲0.02100.22 ▲1.8645.14 ▼0.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/random-quiz-addon-for-lifterlms/ags-ll-random-quiz-addon.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: You can look at the official readme.txt

random-quiz-addon-for-lifterlms/ags-ll-random-quiz-addon.php 85% from 13 tests

The main file in "Random Quiz Generator for LifterLMS" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("random-quiz-addon-for-lifterlms.php" instead of "ags-ll-random-quiz-addon.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin163 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16241128
JavaScript281235

PHP code Passed 2 tests

A short review of 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.44
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin