78% polldaddy

Code Review | Crowdsignal Dashboard - Polls, Surveys & more

WordPress plugin Crowdsignal Dashboard - Polls, Surveys & more scored78%from 54 tests.

About plugin

  • Plugin page: polldaddy
  • Plugin version: 3.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Oct 15, 2008
  • Latest release: Nov 22, 2023
  • Number of updates: 410
  • Update frequency: every 13.5 days
  • Top authors: donncha (46.59%)eoigal (28.29%)mdawaffe (7.56%)alternatekev (7.32%)cgastrell (5.12%)

Code review

54 tests

User reviews

34 reviews

Install metrics

100,000+ active /1,164,533 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.23MB] [CPU: ▲5.66ms] 75% from 4 tests

An overview of server-side resources used by Crowdsignal Dashboard - Polls, Surveys & more
It is recommended to improve the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 8,682.83ms on /wp-admin/options-general.php?page=crowdsignal-settings)
PageMemory (MB)CPU Time (ms)
Home /4.70 ▲1.2350.89 ▲8.82
Dashboard /wp-admin4.54 ▲1.2353.70 ▲3.48
Posts /wp-admin/edit.php4.65 ▲1.2963.27 ▲5.30
Add New Post /wp-admin/post-new.php7.12 ▲1.2399.37 ▲5.04
Media Library /wp-admin/upload.php4.46 ▲1.2351.70 ▲20.60
Ratings /wp-admin/options-general.php?page=ratingsettings4.495,914.32
Ratings /wp-admin/edit.php?post_type=feedback&page=ratings4.463,849.63
Crowdsignal /wp-admin/edit.php?post_type=feedback&page=polls4.506,743.33
Crowdsignal /wp-admin/options-general.php?page=crowdsignal-settings4.528,682.83

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 226 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_pd_top_rated
crowdsignal_api_key_secret
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Crowdsignal Dashboard - Polls, Surveys & more
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8814.23 ▼0.151.72 ▼0.0243.42 ▼1.37
Dashboard /wp-admin2,258 ▲845.64 ▲0.1295.83 ▼5.8542.21 ▼2.15
Posts /wp-admin/edit.php2,167 ▲672.00 ▲0.0638.54 ▼5.7535.86 ▼7.47
Add New Post /wp-admin/post-new.php1,554 ▲2823.17 ▲0.08668.21 ▲77.4356.70 ▲9.13
Media Library /wp-admin/upload.php1,455 ▲584.18 ▼0.0998.83 ▲0.5342.26 ▲1.56
Ratings /wp-admin/options-general.php?page=ratingsettings8205.65130.9122.66
Ratings /wp-admin/edit.php?post_type=feedback&page=ratings9016.1857.9321.84
Crowdsignal /wp-admin/edit.php?post_type=feedback&page=polls1,2276.4864.4459.13
Crowdsignal /wp-admin/options-general.php?page=crowdsignal-settings1,0196.0855.2645.19

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 does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_pd_top_rated
    • db_upgraded
    • can_compress_scripts
    • crowdsignal_api_key_secret
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/polldaddy/polldaddy-org.php
    • > /wp-content/plugins/polldaddy/partials/errors.php
    • > /wp-content/plugins/polldaddy/rating.php
    • > /wp-content/plugins/polldaddy/polldaddy-shortcode.php
    • > /wp-content/plugins/polldaddy/popups.php
    • > /wp-content/plugins/polldaddy/ajax.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/polldaddy/polldaddy.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/polldaddy/partials/settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/polldaddy/partials/crowdsignal-landing-page.php:14
    • > PHP Notice
      Undefined variable: error_codes in wp-content/plugins/polldaddy/partials/errors.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/polldaddy/partials/api-key-page.php:9
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/polldaddy/partials/errors.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/polldaddy/partials/polls-table.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/polldaddy/partials/poll-edit-form.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/polldaddy/partials/settings-2.php:10

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

polldaddy/polldaddy.php Passed 13 tests

"Crowdsignal Dashboard - Polls, Surveys & more" version 3.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
60 characters long description:
Create and manage Crowdsignal polls and ratings in WordPress

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected48,462 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
PO File3716,96711738,139
PHP221,4094958,814
CSS4204111,211
SVG1403249
JavaScript79149

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 212)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity18.16
▷ Minimum class complexity1.00
▷ Maximum class complexity624.00
Average method complexity8.82
▷ Minimum method complexity1.00
▷ Maximum method complexity212.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes57
▷ Abstract classes00.00%
▷ Concrete classes57100.00%
▷ Final classes00.00%
Methods125
▷ Static methods10.80%
▷ Public methods12096.00%
▷ Protected methods00.00%
▷ Private methods54.00%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
90 compressed PNG files occupy 0.98MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/polldaddy.png0.74KB0.72KB▼ 1.46%
img/st-thinking-female.png20.36KB20.32KB0.19%
img/st-tech-light.png11.83KB11.78KB0.49%
img/star-yellow-sml@2x.png8.02KB3.28KB▼ 59.04%
img/st-plastic-grey.png13.20KB12.69KB▼ 3.84%