78% wowquestionnaire

Code Review | WOW!Q

WordPress plugin WOW!Q scored78%from 54 tests.

About plugin

  • Plugin page: wowquestionnaire
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Mar 17, 2018
  • Latest release: Feb 6, 2020
  • Number of updates: 51
  • Update frequency: every 13.6 days
  • Top authors: australiawow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,577 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.56MB] [CPU: ▼6.17ms] Passed 4 tests

Server-side resources used by WOW!Q
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.6045.38 ▲4.55
Dashboard /wp-admin3.91 ▲0.5647.82 ▼22.11
Posts /wp-admin/edit.php3.96 ▲0.6049.62 ▲6.26
Add New Post /wp-admin/post-new.php6.43 ▲0.5489.71 ▼7.05
Media Library /wp-admin/upload.php3.77 ▲0.5435.38 ▼0.08

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 101 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WOW!Q
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.54 ▼0.8113.16 ▲11.6139.70 ▼4.38
Dashboard /wp-admin2,205 ▲285.58 ▼0.0483.97 ▼3.5736.92 ▼3.61
Posts /wp-admin/edit.php2,107 ▲71.98 ▼0.0532.33 ▼3.4831.23 ▼1.96
Add New Post /wp-admin/post-new.php1,531 ▲522.09 ▼1.49651.44 ▼54.9053.57 ▼1.59
Media Library /wp-admin/upload.php1,401 ▲44.23 ▼0.0494.37 ▼9.2940.69 ▼5.02

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wowquestionnaire/public/partials/wow-questionnaire-public-display.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Wow_Questionnaire_Admin' not found in wp-content/plugins/wowquestionnaire/admin/settings/class-wowq-questionnaires.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wowquestionnaire/public/partials/privacy-policy-template.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Wow_Questionnaire_Admin' not found in wp-content/plugins/wowquestionnaire/admin/settings/class-wowq-gdpr.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function flush_rewrite_rules() in wp-content/plugins/wowquestionnaire/admin/partials/wow-questionnaire-admin-display.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Wow_Questionnaire_Admin' not found in wp-content/plugins/wowquestionnaire/admin/settings/class-wowq-privacy-policy.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Wow_Questionnaire_Admin' not found in wp-content/plugins/wowquestionnaire/admin/settings/class-wowq-settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wowquestionnaire/public/partials/gdpr-template.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Requires php: Invalid version format
The official readme.txt might help

wowquestionnaire/wow-questionnaire.php 85% from 13 tests

The main PHP script in "WOW!Q" version 1.4.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wowquestionnaire.php" instead of "wow-questionnaire.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected69,995 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2982799124,917
CSS226099720,739
JSON20018,675
SVG2002,959
PHP187261,0102,696
Markdown1409

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity24.27
▷ Minimum class complexity1.00
▷ Maximum class complexity207.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods93
▷ Static methods22.15%
▷ Public methods7580.65%
▷ Protected methods00.00%
▷ Private methods1819.35%
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

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.26MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/powered_by_square.png7.78KB3.70KB▼ 52.51%
public/images/powered_by_stripe.png2.45KB2.28KB▼ 6.89%
public/images/EU_Flag.png12.40KB7.14KB▼ 42.40%
public/images/down-arrow.png0.29KB0.25KB▼ 15.28%
public/vendor/int-tel-input/img/flags@2x.png170.28KB68.04KB▼ 60.04%