83% website-survey-widget-startquestion

Code Review | Website survey widget by Startquestion

WordPress plugin Website survey widget by Startquestion scored83%from 54 tests.

About plugin

  • Plugin page: website-survey-wi...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 9, 2023
  • Latest release: Feb 9, 2023
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: damianlewita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /114 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.47ms] Passed 4 tests

An overview of server-side resources used by Website survey widget by Startquestion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.65 ▼5.39
Dashboard /wp-admin3.35 ▲0.0448.79 ▼4.91
Posts /wp-admin/edit.php3.46 ▲0.1152.22 ▲1.14
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.28 ▼3.16
Media Library /wp-admin/upload.php3.27 ▲0.0437.29 ▼0.43
Startquestion widget /wp-admin/options-general.php?page=website-survey-widget-startquestion3.2433.89

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Website survey widget by Startquestion
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4713.27 ▼1.084.24 ▲2.5743.27 ▲4.73
Dashboard /wp-admin2,208 ▲285.56 ▼0.1485.14 ▼7.4338.62 ▼5.56
Posts /wp-admin/edit.php2,120 ▲232.00 ▲0.0237.67 ▲2.7837.03 ▼0.01
Add New Post /wp-admin/post-new.php1,544 ▲1623.10 ▲0.16678.80 ▼22.1351.20 ▲0.57
Media Library /wp-admin/upload.php1,419 ▲164.30 ▲0.1097.74 ▼5.8442.94 ▼2.71
Startquestion widget /wp-admin/options-general.php?page=website-survey-widget-startquestion8931.9925.2131.40

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WebsiteSurveyWidgetStartquestion\\is_admin() in wp-content/plugins/website-survey-widget-startquestion/plugin.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Widget preview - various different types of questions: NPS, single-, multi-choice, text, rating and e-mail.) image not found
You can look at the official readme.txt

website-survey-widget-startquestion/plugin.php 85% from 13 tests

"Website survey widget by Startquestion" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 168 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("website-survey-widget-startquestion.php" instead of "plugin.php")

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
There were no executable files found in this plugin256 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP55214180
JavaScript17043
CSS12021
SVG10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.00
▷ Minimum class complexity3.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods318.75%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 compressed PNG files occupy 0.14MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png2.70KB2.82KB0.00%
assets/widget.png69.43KB73.92KB0.00%
assets/screenshot-1.png69.43KB73.92KB0.00%