83% poll-and-survey

Code Review | Poll And Survey plugin

WordPress plugin Poll And Survey plugin scored 83% from 54 tests.

About plugin

  • Plugin page: poll-and-survey
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 6.3.1
  • First release: Mar 31, 2020
  • Latest release: Dec 12, 2020
  • Number of updates: 7
  • Update frequency: every 36.6 days
  • Top authors: techmix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,455 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
Installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼0.66ms] Passed 4 tests

Server-side resources used by Poll And Survey plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2137.80 ▲1.69
Dashboard /wp-admin3.51 ▲0.2145.42 ▼4.20
Posts /wp-admin/edit.php3.62 ▲0.2751.18 ▲2.23
Add New Post /wp-admin/post-new.php6.11 ▲0.23101.03 ▼0.62
Media Library /wp-admin/upload.php3.43 ▲0.2036.99 ▲0.50
All Polls /wp-admin/edit.php?post_type=polls_survey3.4834.85
Add New /wp-admin/post-new.php?post_type=polls_survey3.4947.65

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_pasp_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Poll And Survey plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲20013.57 ▼0.8110.53 ▲8.6040.06 ▼2.21
Dashboard /wp-admin2,246 ▲555.89 ▲1.00108.02 ▲0.5441.29 ▼0.12
Posts /wp-admin/edit.php2,147 ▲582.27 ▲0.2939.61 ▲5.8333.73 ▼1.05
Add New Post /wp-admin/post-new.php1,565 ▲5123.52 ▲5.86655.26 ▼46.1249.23 ▼6.13
Media Library /wp-admin/upload.php1,439 ▲514.31 ▲0.1095.78 ▼11.0541.55 ▼5.87
All Polls /wp-admin/edit.php?post_type=polls_survey1,1142.2431.6926.07
Add New /wp-admin/post-new.php?post_type=polls_survey1,7713.6762.5734.14

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 7 options in the database
    • theysaidso_admin_options
    • widget_pasp_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/poll-and-survey/inc/Base/class-widget.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/poll-and-survey/templates/pasp_poll_template.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/poll-and-survey/inc/Base/class-widget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: survey, democracy, vote, opinion, questionnaire...

poll-and-survey/poll-and-survey-plugin.php 69% from 13 tests

"Poll And Survey plugin" version 1.01's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("poll-and-survey.php" instead of "poll-and-survey-plugin.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 180 characters long)

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 detected1,239 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP17110144974
CSS2203175
JavaScript29090
HTML1080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.07
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods40
▷ Static methods615.00%
▷ Public methods40100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin