72% gd-topic-polls

Code Review | GD Topic Polls: plugin for WordPress and bbPress Forums

WordPress plugin GD Topic Polls: plugin for WordPress and bbPress Forums scored72%from 54 tests.

About plugin

  • Plugin page: gd-topic-polls
  • Plugin version: 2.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Jul 31, 2017
  • Latest release: Nov 1, 2023
  • Number of updates: 38
  • Update frequency: every 60.1 days
  • Top authors: GDragoN (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /13,271 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by GD Topic Polls: plugin for WordPress and bbPress Forums
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.94 ▼7.29
Dashboard /wp-admin3.31 ▲0.0045.68 ▼4.67
Posts /wp-admin/edit.php3.36 ▲0.0049.18 ▲2.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.74 ▼17.52
Media Library /wp-admin/upload.php3.23 ▲0.0037.10 ▲1.67
Overview /wp-admin/admin.php?page=gd-topic-polls-dashboard3.0123.18
About /wp-admin/admin.php?page=gd-topic-polls-about3.0027.51
Tools /wp-admin/admin.php?page=gd-topic-polls-tools3.0022.42
Votes /wp-admin/admin.php?page=gd-topic-polls-votes3.0023.83
Settings /wp-admin/admin.php?page=gd-topic-polls-settings3.0019.63
Polls /wp-admin/admin.php?page=gd-topic-polls-polls3.0025.53

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 419 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

GD Topic Polls: plugin for WordPress and bbPress Forums: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.27 ▼0.281.58 ▼0.1439.42 ▼6.14
Dashboard /wp-admin2,195 ▲185.56 ▲0.0590.83 ▼10.5738.84 ▼9.65
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0238.40 ▼1.1736.17 ▲2.53
Add New Post /wp-admin/post-new.php1,526 ▼1022.99 ▲4.93692.57 ▲72.0055.56 ▼17.24
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0599.82 ▲5.2342.99 ▲1.63
Overview /wp-admin/admin.php?page=gd-topic-polls-dashboard280.420.083.72
About /wp-admin/admin.php?page=gd-topic-polls-about280.420.093.35
Tools /wp-admin/admin.php?page=gd-topic-polls-tools280.420.114.21
Votes /wp-admin/admin.php?page=gd-topic-polls-votes280.420.074.00
Settings /wp-admin/admin.php?page=gd-topic-polls-settings280.420.093.57
Polls /wp-admin/admin.php?page=gd-topic-polls-polls280.420.063.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/gd-topic-polls/forms/content-about-whatsnew.php
  • 41× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant GDPOL_PATH - assumed 'GDPOL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gd-topic-polls/forms/content-update.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gd-topic-polls/forms/content-dashboard-status.php:2
    • > PHP Warning
      include(GDPOL_PATHforms/setup/rules.php): failed to open stream: No such file or directory in wp-content/plugins/gd-topic-polls/forms/content-install.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gd-topic-polls/forms/content-about-changelog.php:2
    • > PHP Warning
      include(GDPOL_PATHforms/setup/database.php): failed to open stream: No such file or directory in wp-content/plugins/gd-topic-polls/forms/content-install.php on line 11
    • > PHP Warning
      include(): Failed opening 'GDPOL_PATHforms/setup/rules.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/gd-topic-polls/forms/content-update.php on line 12
    • > PHP Warning
      include(GDPOL_PATHforms/content-about-minor.php): failed to open stream: No such file or directory in wp-content/plugins/gd-topic-polls/forms/content-about-whatsnew.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function gdpol_settings() in wp-content/plugins/gd-topic-polls/forms/content-update.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gd-topic-polls/forms/dialogs/polls.php:2
    • > PHP Warning
      include(): Failed opening 'GDPOL_PATHforms/setup/rules.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/gd-topic-polls/forms/content-install.php on line 12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=gd-topic-polls-dashboard
    • > Network (severe)
    wp-admin/admin.php?page=gd-topic-polls-dashboard - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=gd-topic-polls-about
    • > Network (severe)
    wp-admin/admin.php?page=gd-topic-polls-about - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=gd-topic-polls-tools
    • > Network (severe)
    wp-admin/admin.php?page=gd-topic-polls-tools - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=gd-topic-polls-votes
    • > Network (severe)
    wp-admin/admin.php?page=gd-topic-polls-votes - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=gd-topic-polls-settings
    • > Network (severe)
    wp-admin/admin.php?page=gd-topic-polls-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=gd-topic-polls-polls
    • > Network (severe)
    wp-admin/admin.php?page=gd-topic-polls-polls - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 96% 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
5 plugin tags: dev4press, forum, bbpress poll, forum polls, topic poll

gd-topic-polls/gd-topic-polls.php 92% from 13 tests

The main PHP script in "GD Topic Polls: plugin for WordPress and bbPress Forums" version 2.3 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin38,093 lines of code in 371 files:
LanguageFilesBlank linesComment linesLines of code
PHP2034,5232,83117,982
CSS451,4933911,331
Sass49910265,269
JavaScript723521103,483
Markdown212028

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity15.64
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces39
Interfaces0
Traits3
Classes129
▷ Abstract classes4232.56%
▷ Concrete classes8767.44%
▷ Final classes22.30%
Methods1,266
▷ Static methods19715.56%
▷ Public methods94074.25%
▷ Protected methods27521.72%
▷ Private methods514.03%
Functions23
▷ Named functions2191.30%
▷ Anonymous functions28.70%
Constants52
▷ Global constants59.62%
▷ Class constants4790.38%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
d4plib/resources/vendor/flags/img/flag_placeholder.png0.09KB0.09KB0.00%
templates/quantum/css/icons/chart.png0.63KB0.73KB0.00%
d4plib/resources/gfx/buy_me_a_coffee.png7.73KB7.79KB0.00%
templates/default/css/icons/chart.png0.63KB0.73KB0.00%
d4plib/resources/vendor/flags/img/flags_responsive.png54.14KB57.01KB0.00%