84% questionpro-surveys

Code Review | QuestionPro Surveys

WordPress plugin QuestionPro Surveys scored84%from 54 tests.

About plugin

  • Plugin page: questionpro-surveys
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 6.3.1
  • First release: Jun 19, 2019
  • Latest release: Jul 12, 2019
  • Number of updates: 13
  • Update frequency: every 12.5 days
  • Top authors: questionpro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,730 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.50ms] Passed 4 tests

A check of server-side resources used by QuestionPro Surveys
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.41 ▲2.33
Dashboard /wp-admin3.31 ▲0.0154.94 ▼0.81
Posts /wp-admin/edit.php3.36 ▲0.0151.51 ▼0.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.36 ▼14.79
Media Library /wp-admin/upload.php3.23 ▲0.0138.29 ▲2.06

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by QuestionPro Surveys
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.37 ▲0.012.02 ▲0.3041.92 ▼0.11
Dashboard /wp-admin2,198 ▲245.61 ▲0.0390.38 ▲0.6542.79 ▲3.66
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0640.00 ▲3.2736.52 ▼0.09
Add New Post /wp-admin/post-new.php6,362 ▲4,83627.62 ▲4.09913.42 ▲223.6660.49 ▲8.26
Media Library /wp-admin/upload.php1,397 ▼34.14 ▼0.11107.59 ▲8.4648.47 ▲2.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/questionpro-surveys/index.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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: plugin, surveys, blog

questionpro-surveys/index.php 92% from 13 tests

The main file in "QuestionPro Surveys" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("questionpro-surveys.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected115 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13084
PHP13831

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin