78% lequiz

Code Review | Le Quiz

WordPress plugin Le Quiz scored78%from 54 tests.

About plugin

  • Plugin page: lequiz
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0
  • WordPress version: 6.3.1
  • First release: Dec 30, 2021
  • Latest release: Jun 1, 2022
  • Number of updates: 27
  • Update frequency: every 5.7 days
  • Top authors: joelvelon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /823 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼4.19ms] Passed 4 tests

An overview of server-side resources used by Le Quiz
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.46 ▼2.88
Dashboard /wp-admin3.47 ▲0.1648.79 ▼2.99
Posts /wp-admin/edit.php3.58 ▲0.2359.50 ▲14.21
Add New Post /wp-admin/post-new.php6.05 ▲0.1691.57 ▼13.57
Media Library /wp-admin/upload.php3.39 ▲0.1636.82 ▲2.70
Le Quiz /wp-admin/options-general.php?page=lequiz_sub_level_settings_page3.3742.02

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 9 new options
New WordPress options
wp_calendar_block_has_published_posts
widget_theysaidso_widget
widget_recent-posts
category_children
can_compress_scripts
lequiz_prem
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Le Quiz
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲12213.39 ▼1.251.70 ▼0.1439.66 ▼5.48
Dashboard /wp-admin2,228 ▲375.91 ▲0.01102.53 ▼9.7339.77 ▼1.24
Posts /wp-admin/edit.php2,254 ▲1651.99 ▼0.0638.91 ▼1.8933.68 ▼2.42
Add New Post /wp-admin/post-new.php1,550 ▲3123.17 ▲0.01665.23 ▼10.3956.41 ▲5.39
Media Library /wp-admin/upload.php1,401 ▲134.17 ▼0.0097.36 ▼4.5343.18 ▲0.35
Le Quiz /wp-admin/options-general.php?page=lequiz_sub_level_settings_page1,2942.0527.2929.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • lequiz_prem
    • can_compress_scripts
    • category_children
    • db_upgraded
    • wp_calendar_block_has_published_posts
    • widget_recent-comments

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/lequiz/inc/aide.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lequiz/inc/admin-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/lequiz/lequiz.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

lequiz/lequiz.php 92% from 13 tests

The principal PHP file in "Le Quiz" v. 1.6.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,687 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript245681,548
PHP48573919
CSS130220

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/outils.png1.70KB1.41KB▼ 16.88%