84% simple-quiz-block

Code Review | Simple Quiz Block

WordPress plugin Simple Quiz Block scored84%from 54 tests.

About plugin

  • Plugin page: simple-quiz-block
  • Plugin version: 0.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1
  • WordPress version: 6.3.1
  • First release: May 6, 2023
  • Latest release: May 6, 2023
  • Number of updates: 14
  • Update frequency: every 0.1 days
  • Top authors: eromnoj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /445 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
This plugin's installer ran successfully

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

A check of server-side resources used by Simple Quiz Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0442.37 ▼3.80
Dashboard /wp-admin3.33 ▲0.0352.13 ▼1.74
Posts /wp-admin/edit.php3.39 ▲0.0353.24 ▼0.80
Add New Post /wp-admin/post-new.php5.92 ▲0.04100.96 ▼9.00
Media Library /wp-admin/upload.php3.26 ▲0.0344.96 ▲8.34

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Quiz Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.73 ▲0.172.25 ▲0.3041.26 ▼3.90
Dashboard /wp-admin2,195 ▲215.60 ▲0.0491.64 ▼2.9540.41 ▼2.32
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0840.80 ▲3.9636.50 ▼0.79
Add New Post /wp-admin/post-new.php6,366 ▲4,83228.12 ▲5.09879.69 ▲239.6158.05 ▼4.37
Media Library /wp-admin/upload.php1,397 ▲34.26 ▲0.09110.48 ▲10.9349.63 ▲4.89

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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
Please fix the following
  • 3× 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/simple-quiz-block/simple-quiz-block.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_block_wrapper_attributes() in wp-content/plugins/simple-quiz-block/src/render.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_block_wrapper_attributes() in wp-content/plugins/simple-quiz-block/build/render.php:1

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: french, block, quiz

simple-quiz-block/simple-quiz-block.php Passed 13 tests

The entry point to "Simple Quiz Block" version 0.2.0 is a PHP file that has certain tags in its header comment area
98 characters long description:
Ajoutez un encadré dédié avec une question issue de l'API Simple Quiz Fr via l'éditeur de bloc

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
Good job! No executable or dangerous file extensions detected16,749 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JSON41016,323
JavaScript83355253
Sass280103
PHP4133668
CSS2002

PHP code Passed 2 tests

An overview 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.17
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%
Functions3
▷ Named functions3100.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
No PNG images were found in this plugin