84% survey

Code Review | Survey

WordPress plugin Survey scored84%from 54 tests.

About plugin

  • Plugin page: survey
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Jan 7, 2017
  • Latest release: Jan 17, 2017
  • Number of updates: 17
  • Update frequency: every 0.7 days
  • Top authors: seosbg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,376 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.67ms] Passed 4 tests

Analyzing server-side resources used by Survey
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.16 ▼8.54
Dashboard /wp-admin3.31 ▲0.0152.28 ▲2.44
Posts /wp-admin/edit.php3.37 ▲0.0152.76 ▲1.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.63 ▼11.44
Media Library /wp-admin/upload.php3.24 ▲0.0139.43 ▼0.35

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Survey
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.65 ▲0.271.61 ▼0.5442.29 ▼2.86
Dashboard /wp-admin2,212 ▲325.60 ▼0.0884.90 ▼7.9589.94 ▲43.58
Posts /wp-admin/edit.php2,114 ▲172.02 ▲0.0140.85 ▲3.4934.99 ▼1.82
Add New Post /wp-admin/post-new.php1,704 ▲17324.47 ▲1.25728.88 ▲85.5853.43 ▲4.91
Media Library /wp-admin/upload.php1,420 ▲204.17 ▼0.09107.83 ▲9.3950.68 ▲5.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/survey/survey.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/survey/inc/form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/survey/inc/shortcode.php:125

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add an image for screenshot #1 (Admin Panel view of submitted form data.)
You can look at the official readme.txt

survey/survey.php Passed 13 tests

"Survey" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
86 characters long description:
Simple WordPress Survey Plugin. Survey is easy to use, Include Shortcode in your page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin311 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP38814213
CSS219098

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
5 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.58KB1.43KB▼ 9.69%
screenshot-1.png15.09KB6.03KB▼ 60.03%
images/logo.png11.25KB4.39KB▼ 60.99%
screenshot-3.png38.16KB14.94KB▼ 60.84%
screenshot-2.png19.10KB7.62KB▼ 60.12%