78% wp-survey-and-poll

Code Review | WordPress Survey & Poll - Quiz, Survey and Poll Plugin for WordPress

WordPress plugin WordPress Survey & Poll - Quiz, Survey and Poll Plugin for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: wp-survey-and-poll
  • Plugin version: 1.7.5
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 9, 2015
  • Latest release: Nov 24, 2023
  • Number of updates: 119
  • Update frequency: every 27.2 days
  • Top authors: pantherius (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

700+ active /64,514 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.02MB] [CPU: ▼2.08ms] Passed 4 tests

An overview of server-side resources used by WordPress Survey & Poll - Quiz, Survey and Poll Plugin for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.04 ▼6.68
Dashboard /wp-admin3.33 ▲0.0246.81 ▼1.54
Posts /wp-admin/edit.php3.44 ▲0.0848.30 ▲1.59
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.78 ▼1.68
Media Library /wp-admin/upload.php3.25 ▲0.0239.80 ▲5.40

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 65 new files
Database: 3 new tables, 6 new options
New tables
wp_wp_sap_answers
wp_wp_sap_questions
wp_wp_sap_surveys
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Survey & Poll - Quiz, Survey and Poll Plugin for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲16414.33 ▲0.1215.51 ▲13.6638.70 ▼5.51
Dashboard /wp-admin2,207 ▲295.64 ▼0.1290.93 ▼24.0139.21 ▼4.80
Posts /wp-admin/edit.php2,112 ▲121.98 ▼0.0439.73 ▲0.2636.61 ▲0.53
Add New Post /wp-admin/post-new.php1,536 ▲1023.64 ▲0.06699.68 ▲34.3461.72 ▼0.84
Media Library /wp-admin/upload.php1,415 ▲154.19 ▼0.02102.89 ▲6.5544.86 ▲1.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-survey-and-poll/templates/sidebar.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-survey-and-poll/templates/settings.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

wp-survey-and-poll/wordpress-survey-and-poll.php 92% from 13 tests

The main PHP script in "WordPress Survey & Poll - Quiz, Survey and Poll Plugin for WordPress" version 1.7.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-survey-and-poll.php" instead of "wordpress-survey-and-poll.php")

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
There were no executable files found in this plugin26,730 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript123,1131,83319,017
CSS5468924,334
PHP426723,376
SVG3003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity266.50
▷ Minimum class complexity35.00
▷ Maximum class complexity498.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods416.67%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
37 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/assets/css/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
templates/assets/img/star-icon.png1.16KB0.68KB▼ 41.35%
templates/assets/css/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
templates/assets/img/play-button.png0.89KB0.54KB▼ 40.17%
templates/assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%