10% postpoll

Code Review | Postpoll

WordPress plugin Postpoll scored10%from 54 tests.

About plugin

  • Plugin page: postpoll
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 6.3.1
  • First release: Jun 18, 2015
  • Latest release: Aug 8, 2015
  • Number of updates: 9
  • Update frequency: every 5.7 days
  • Top authors: k2klettern (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,130 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/postpoll/post_poll.php+75
    Undefined variable: jal_db_version

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.53ms] Passed 4 tests

Server-side resources used by Postpoll
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.41 ▼6.00
Dashboard /wp-admin3.38 ▲0.0752.06 ▼1.06
Posts /wp-admin/edit.php3.49 ▲0.1451.93 ▲0.56
Add New Post /wp-admin/post-new.php5.96 ▲0.0796.05 ▲4.37
Media Library /wp-admin/upload.php3.30 ▲0.0740.60 ▲6.73
Report polls /wp-admin/admin.php?page=Postpoll-report3.2734.73
Edit polls /wp-admin/admin.php?page=Postpoll-edit3.3733.09
Postpoll Plugin /wp-admin/admin.php?page=Postpoll-plugin3.2834.39

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: 1 new table, 8 new options
New tables
wp_postpoll
New WordPress options
can_compress_scripts
jal_db_version
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_postpoll_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Postpoll
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲21213.66 ▼0.955.82 ▲3.9042.64 ▼3.82
Dashboard /wp-admin2,246 ▲554.91 ▼0.94116.17 ▲7.5643.54 ▲1.02
Posts /wp-admin/edit.php2,132 ▲432.04 ▲0.0735.13 ▼5.4435.79 ▼1.40
Add New Post /wp-admin/post-new.php1,548 ▲3423.40 ▲5.82673.70 ▲7.5571.17 ▲10.96
Media Library /wp-admin/upload.php1,431 ▲434.21 ▼0.0398.13 ▼6.8242.53 ▼3.75
Report polls /wp-admin/admin.php?page=Postpoll-report8131.8525.3124.02
Edit polls /wp-admin/admin.php?page=Postpoll-edit7041.197.8323.23
Postpoll Plugin /wp-admin/admin.php?page=Postpoll-plugin8791.6922.6923.89

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_postpoll
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_postpoll_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • jal_db_version
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=Postpoll-edit
    • > Notice in wp-content/plugins/postpoll/postpoll_edit.php+2
    Undefined index: pollid

SRP 50% 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
The following issues need your attention
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined index: pollid in wp-content/plugins/postpoll/postpoll_edit.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/postpoll/postpoll_init.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/postpoll/libppl/functions.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/postpoll/postpoll_edit.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/postpoll/libppl/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_atts() in wp-content/plugins/postpoll/postpoll_show.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/postpoll/postpoll_report.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/postpoll/post_poll.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Add an administration Menu to manage the polls), #2 (You can Edit your poll, adding the posts to it. You can see how it will be show the poll on the front and select which method you want to use (selector, radio, multiple)), #3 (A widget is provided to show the poll with a Selector), #4 (This is how you will see a poll in your Widget with multiple option mode to Vote, also with the posts thumbnail option on), #5 (If you set to show totals after use vote this is how user will see it)
You can take inspiration from this readme.txt

postpoll/post_poll.php 92% from 13 tests

"Postpoll" version 0.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("postpoll.php" instead of "post_poll.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,053 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP88233853
PO File14446104
JavaScript24072
CSS152124

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.45
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity8.50
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin