78% snappy-surveys

Code Review | Snappy Surveys

WordPress plugin Snappy Surveys scored78%from 54 tests.

About plugin

  • Plugin page: snappy-surveys
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Sep 22, 2015
  • Latest release: Feb 15, 2016
  • Number of updates: 8
  • Update frequency: every 18.5 days
  • Top authors: madesnappy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,604 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.03MB] [CPU: ▼6.07ms] Passed 4 tests

An overview of server-side resources used by Snappy Surveys
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.18 ▼1.32
Dashboard /wp-admin3.33 ▲0.0341.78 ▼9.28
Posts /wp-admin/edit.php3.38 ▲0.0346.58 ▲1.77
Add New Post /wp-admin/post-new.php5.93 ▲0.0585.40 ▼9.18
Media Library /wp-admin/upload.php3.26 ▲0.0332.28 ▼4.51
Stats /wp-admin/admin.php?page=ssp_stats_page3.2128.62
Welcome /wp-admin/admin.php?page=ssp_welcome_page3.2126.82
Surveys /wp-admin/edit.php?post_type=ssp_survey3.3035.08

Server storage [IO: ▲0.03MB] [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: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Snappy Surveys: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲20613.99 ▼0.395.09 ▲3.3738.29 ▼8.67
Dashboard /wp-admin2,239 ▲514.88 ▼1.02118.18 ▲9.2742.23 ▲2.30
Posts /wp-admin/edit.php2,122 ▲332.02 ▲0.0237.99 ▲0.7433.35 ▲2.80
Add New Post /wp-admin/post-new.php1,541 ▲817.34 ▼5.76654.19 ▼20.5657.42 ▲1.65
Media Library /wp-admin/upload.php1,421 ▲334.20 ▲0.0092.68 ▼11.4742.15 ▼2.20
Stats /wp-admin/admin.php?page=ssp_stats_page8102.0428.7031.07
Welcome /wp-admin/admin.php?page=ssp_welcome_page8122.0726.6028.59
Surveys /wp-admin/edit.php?post_type=ssp_survey1,0772.0234.2827.82

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=ssp_stats_page
    • > Notice in wp-content/plugins/snappy-surveys/snappy-surveys.php+929
    Undefined variable: select_html

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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/snappy-surveys/cpt/ssp_survey.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/snappy-surveys/snappy-surveys.php:62

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

snappy-surveys/snappy-surveys.php Passed 13 tests

This is the main PHP file of "Snappy Surveys" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
123 characters long description:
Get to know your audience. Create simple surveys that capture annonymous data. See insightful statistics from your surveys.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected569 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2340222460
JavaScript23332105
CSS1004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin