62% poll-builder

Code Review | Poll, Poll Forms - WordPress Poll plugin by Poll Builder

WordPress plugin Poll, Poll Forms - WordPress Poll plugin by Poll Builder scored62%from 54 tests.

About plugin

  • Plugin page: poll-builder
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 19, 2019
  • Latest release: Jan 26, 2023
  • Number of updates: 109
  • Update frequency: every 11.5 days
  • Top authors: devfelixmoira (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,841 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.46MB] [CPU: ▲6.80ms] Passed 4 tests

Server-side resources used by Poll, Poll Forms - WordPress Poll plugin by Poll Builder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4847.42 ▲9.94
Dashboard /wp-admin3.78 ▲0.4452.81 ▼4.92
Posts /wp-admin/edit.php3.82 ▲0.4657.26 ▲9.33
Add New Post /wp-admin/post-new.php6.39 ▲0.5197.15 ▲12.86
Media Library /wp-admin/upload.php3.71 ▲0.4847.26 ▲13.89
Support /wp-admin/edit.php?post_type=yplpoll&page=YPL-support-page3.6838.62
Categories /wp-admin/edit-tags.php?taxonomy=yplpoll-category&post_type=yplpoll3.7039.99
All Poll Builder /wp-admin/edit.php?post_type=yplpoll3.7442.84
Results /wp-admin/edit.php?post_type=yplpoll&page=yplResults4.0042.12
More Ideas? /wp-admin/edit.php?post_type=yplpoll&page=YPL-more-ideas3.6834.20
Add New /wp-admin/post-new.php?post_type=yplpoll3.7541.48

Server storage [IO: ▲0.49MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 50 new files
Database: 2 new tables, 8 new options
New tables
wp_ypl_results
wp_ypl_user_details
New WordPress options
widget_ypl_widget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
ypl_redirect
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Poll, Poll Forms - WordPress Poll plugin by Poll Builder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲13013.25 ▼1.011.69 ▼0.0450.24 ▲8.76
Dashboard /wp-admin2,282 ▲915.90 ▲1.0299.52 ▼5.9853.96 ▲15.52
Posts /wp-admin/edit.php2,180 ▲942.06 ▲0.0340.61 ▲4.1649.39 ▲15.74
Add New Post /wp-admin/post-new.php6,224 ▲4,71119.44 ▲1.79881.17 ▲244.7462.72 ▲5.34
Media Library /wp-admin/upload.php1,463 ▲754.26 ▲0.0498.03 ▲0.1054.16 ▲13.32
Support /wp-admin/edit.php?post_type=yplpoll&page=YPL-support-page8283.9473.5123.90
Categories /wp-admin/edit-tags.php?taxonomy=yplpoll-category&post_type=yplpoll1,3442.2027.3444.62
All Poll Builder /wp-admin/edit.php?post_type=yplpoll1,1664.3376.5130.60
Results /wp-admin/edit.php?post_type=yplpoll&page=yplResults1,0733.8342.5427.26
More Ideas? /wp-admin/edit.php?post_type=yplpoll&page=YPL-more-ideas8683.8438.8823.10
Add New /wp-admin/post-new.php?post_type=yplpoll3,1808.55259.77138.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_ypl_user_details
    • wp_ypl_results
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_ypl_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=yplpoll
    • > Notice in wp-content/plugins/poll-builder/public/views/pages/shortcodeMetabox.php+2
    Undefined index: post
    • > GET request to /wp-admin/post-new.php?post_type=yplpoll
    • > Warning in wp-content/plugins/poll-builder/public/views/pages/general.php+45
    Use of undefined constant YRM_LANG - assumed 'YRM_LANG' (this will throw an Error in a future version of PHP)

SRP 0% 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/poll-builder/public/views/pages/support.php
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ypl\\add_filter() in wp-content/plugins/poll-builder/com/classes/Filters.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ypl\\add_action() in wp-content/plugins/poll-builder/com/classes/Js.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ypl\\add_action() in wp-content/plugins/poll-builder/com/classes/Css.php:11
    • > PHP Warning
      Use of undefined constant YPL_HELPERS_PATH - assumed 'YPL_HELPERS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/poll-builder/com/classes/YplInit.php on line 30
    • > PHP Fatal error
      Uncaught Error: Class 'ypl\\PollResults' not found in wp-content/plugins/poll-builder/public/views/pages/pollResult.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/poll-builder/yplPoll.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/poll-builder/com/classes/admin/Widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ypl\\plugins_url() in wp-content/plugins/poll-builder/com/config/config.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'ypl\\YplOptionsConfig' not found in wp-content/plugins/poll-builder/public/views/classic/options.php:6
    • > PHP Warning
      Use of undefined constant YPL_SUPPORT_URL - assumed 'YPL_SUPPORT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/poll-builder/public/views/pages/support.php on line 6

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

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in poll-builder/assets to your readme.txt
You can take inspiration from this readme.txt

poll-builder/yplPoll.php 92% from 13 tests

The main PHP script in "Poll, Poll Forms - WordPress Poll plugin by Poll Builder" version 1.3.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("poll-builder.php" instead of "yplPoll.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected14,771 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
CSS439187,040
JavaScript51,2082804,866
PHP346176512,865

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.84
▷ Minimum class complexity1.00
▷ Maximum class complexity117.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes25
▷ Abstract classes28.00%
▷ Concrete classes2392.00%
▷ Final classes00.00%
Methods233
▷ Static methods4117.60%
▷ Public methods18880.69%
▷ Protected methods2410.30%
▷ Private methods219.01%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected