10% poll-directory

Code Review | Poll Directory

WordPress plugin Poll Directory scored10%from 54 tests.

About plugin

  • Plugin page: poll-directory
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Nov 22, 2012
  • Latest release: Nov 19, 2014
  • Number of updates: 29
  • Update frequency: every 25.2 days
  • Top authors: benhallbenhall (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /8,147 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Parse error in wp-content/plugins/poll-directory/index.php+259
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.47ms] Passed 4 tests

A check of server-side resources used by Poll Directory
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.32 ▼1.20
Dashboard /wp-admin3.31 ▲0.0050.67 ▲2.86
Posts /wp-admin/edit.php3.36 ▲0.0049.12 ▲1.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.59 ▼19.26
Media Library /wp-admin/upload.php3.23 ▲0.0031.82 ▼3.20

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Poll Directory: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.48 ▲0.101.90 ▲0.1438.91 ▼2.96
Dashboard /wp-admin2,206 ▲184.86 ▼0.95105.01 ▲0.7038.95 ▼3.86
Posts /wp-admin/edit.php2,092 ▼02.17 ▲0.2038.69 ▼1.5534.17 ▼1.08
Add New Post /wp-admin/post-new.php1,537 ▼1023.14 ▲5.00631.07 ▼24.3168.51 ▲5.92
Media Library /wp-admin/upload.php1,391 ▲64.22 ▼0.1095.11 ▼13.1242.50 ▼4.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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/poll-directory/index.php on line 259

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: premade polls, user polls, free user polls, poll directory

poll-directory/index.php 85% from 13 tests

Analyzing the main PHP file in "Poll Directory" version 2.1.0
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 191 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("poll-directory.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin196 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12933196

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin