94% learnpress-fill-in-blank

Code Review | LearnPress - Fill in Blank Question

WordPress plugin LearnPress - Fill in Blank Question scored 94% from 54 tests.

About plugin

Code review

54 tests

User reviews

3 reviews

Install metrics

3,000+ active / 99,697 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼142.99ms] Passed 4 tests

Server-side resources used by LearnPress - Fill in Blank Question
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0133.48 ▼1.36
Dashboard /wp-admin3.07 ▲0.0154.82 ▲6.26
Posts /wp-admin/edit.php3.12 ▲0.0145.86 ▲0.24
Add New Post /wp-admin/post-new.php5.43 ▼0.0187.13 ▼577.08
Media Library /wp-admin/upload.php3.01 ▲0.0145.43 ▲12.91

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for LearnPress - Fill in Blank Question
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,732 ▲13615.85 ▲0.2810.45 ▲0.4751.80 ▲3.66
Dashboard /wp-admin2,993 ▲596.00 ▼0.01182.13 ▲34.37123.69 ▲16.94
Posts /wp-admin/edit.php2,767 ▲282.72 ▼0.1272.84 ▼1.76100.84 ▲12.53
Add New Post /wp-admin/post-new.php1,633 ▼5021.04 ▲2.21290.08 ▼104.68105.31 ▼3.27
Media Library /wp-admin/upload.php1,839 ▲325.02 ▲0.03168.76 ▲11.12111.24 ▼7.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% 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)
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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/learnpress-fill-in-blank/inc/admin/views/tool-upgrade.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function learn_press_fib_admin_view() in wp-content/plugins/learnpress-fill-in-blank/inc/admin/views/answer-question-editor.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function learn_press_fib_admin_view() in wp-content/plugins/learnpress-fill-in-blank/inc/admin/views/answer-quiz-editor.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/learnpress-fill-in-blank/inc/admin/views/answer-editor.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/learnpress-fill-in-blank/inc/admin/class-upgrade-database.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

learnpress-fill-in-blank/learnpress-fill-in-blank.php Passed 13 tests

The main file in "LearnPress - Fill in Blank Question" v. 3.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
104 characters long description:
Supports type of question Fill In Blank lets user fill out the text into one ( or more than one ) space.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,929 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP112594681,350
CSS3180251
Sass280249
JavaScript211179

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity21.50
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods40
▷ Static methods12.50%
▷ Public methods3382.50%
▷ Protected methods615.00%
▷ Private methods12.50%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin