90% surveyhero

Code Review | SurveyHero

WordPress plugin SurveyHero scored90%from 54 tests.

About plugin

  • Plugin page: surveyhero
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.1.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.7
  • WordPress version: 6.3.1
  • First release: Mar 27, 2019
  • Latest release: Mar 3, 2021
  • Number of updates: 23
  • Update frequency: every 30.7 days
  • Top authors: surveyhero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,441 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.01MB] [CPU: ▼1.03ms] Passed 4 tests

An overview of server-side resources used by SurveyHero
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.38 ▼3.93
Dashboard /wp-admin3.32 ▲0.0150.99 ▼4.49
Posts /wp-admin/edit.php3.37 ▲0.0155.81 ▲3.69
Add New Post /wp-admin/post-new.php5.90 ▲0.01106.28 ▲4.32
Media Library /wp-admin/upload.php3.24 ▲0.0136.45 ▲0.63

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for SurveyHero
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲21714.87 ▲0.5633.81 ▲31.0839.96 ▼5.51
Dashboard /wp-admin2,206 ▲184.87 ▼0.03109.00 ▼14.5342.54 ▼1.06
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0539.98 ▲2.4034.14 ▲0.90
Add New Post /wp-admin/post-new.php6,180 ▲4,66119.12 ▼4.01860.55 ▲177.5936.83 ▼18.04
Media Library /wp-admin/upload.php1,391 ▼04.20 ▲0.02100.22 ▼5.5443.58 ▼0.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
8 plugin tags: question, survey, quiz, questionnaire, embed...

surveyhero/surveyhero.php Passed 13 tests

Analyzing the main PHP file in "SurveyHero" version 1.0.5
58 characters long description:
Embed surveys from SurveyHero into your WordPress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin384 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript94144218
Sass210053
CSS22047
PHP192046
JSON10020

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin