78% quick-questionnaire

Code Review | Quick Questionnaire

WordPress plugin Quick Questionnaire scored78%from 54 tests.

About plugin

  • Plugin page: quick-questionnaire
  • Plugin version: 2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 29, 2017
  • Latest release: Sep 2, 2023
  • Number of updates: 49
  • Update frequency: every 47.7 days
  • Top authors: michielve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,252 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.57MB] [CPU: ▼28.65ms] Passed 4 tests

This is a short check of server-side resources used by Quick Questionnaire
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1142.60 ▼21.95
Dashboard /wp-admin3.40 ▲0.1051.90 ▼7.70
Posts /wp-admin/edit.php3.52 ▲0.1754.63 ▼10.74
Add New Post /wp-admin/post-new.php3.28 ▼2.6040.58 ▼74.19
Media Library /wp-admin/upload.php3.33 ▲0.1036.07 ▲0.15
Quick Questionnaire /wp-admin/edit.php?post_type=quick-questionnaire3.3736.11
Add New /wp-admin/post-new.php?post_type=quick-questionnaire3.2744.72

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Quick Questionnaire
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲11213.28 ▼1.091.97 ▼1.1540.38 ▼26.90
Dashboard /wp-admin2,236 ▲514.86 ▼0.02117.90 ▼48.6847.77 ▼15.67
Posts /wp-admin/edit.php2,121 ▲291.99 ▼0.0143.31 ▼8.1938.20 ▼7.96
Add New Post /wp-admin/post-new.php1,706 ▲17622.33 ▼0.85584.71 ▼62.1149.88 ▼0.76
Media Library /wp-admin/upload.php1,415 ▲274.18 ▼0.0495.15 ▼9.2742.76 ▼5.37
Quick Questionnaire /wp-admin/edit.php?post_type=quick-questionnaire1,0862.0030.8727.85
Add New /wp-admin/post-new.php?post_type=quick-questionnaire1,47416.68848.4332.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=quick-questionnaire
    • > User notice in wp-includes/functions.php+5905
    Function register_rest_route was called incorrectly. The REST API route definition for qq/v1/quick-questionnaire/(?\d+) is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)
    • > GET request to /wp-admin/post-new.php?post_type=quick-questionnaire
    • > User notice in wp-includes/functions.php+5905
    Function register_rest_route was called incorrectly. The REST API route definition for qq/v1/quick-questionnaire/(?\d+)/(?\d+) is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-questionnaire/quick_questionnaire.php:24

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: exercise, test, practice

quick-questionnaire/quick_questionnaire.php 92% from 13 tests

"Quick Questionnaire" version 2.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("quick-questionnaire.php" instead of "quick_questionnaire.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected581 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP269116330
JavaScript2251185
CSS2141737
JSON10029

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions21
▷ Named functions1257.14%
▷ Anonymous functions942.86%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin