10% buyhttp-super-polls

Code Review | BuyHTTP Super Polls

WordPress plugin BuyHTTP Super Polls scored 10% from 54 tests.

About plugin

  • Plugin page: buyhttp-super-polls
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 25, 2014
  • Latest release: Jul 28, 2014
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: keliix06 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 815 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/buyhttp-super-polls/bsp.pluginpage.php+72
    Declaration of Bsp_List_Table::column_default($item) should be compatible with WP_List_Table::column_default($item, $column_name)

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.01ms] Passed 4 tests

Server-side resources used by BuyHTTP Super Polls
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.52 ▼36.69
Dashboard /wp-admin2.05 ▼1.265.12 ▼41.95
Posts /wp-admin/edit.php2.05 ▼1.315.31 ▼39.39
Add New Post /wp-admin/post-new.php2.05 ▼3.844.34 ▼102.01
Media Library /wp-admin/upload.php2.05 ▼1.185.27 ▼31.15
Manage BSP /wp-admin/plugins.php?page=managebsp2.054.72
BuyHTTP Super Polls /wp-admin/options-general.php?page=bsppolls2.055.47

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: 2 new tables, 7 new options
New tables
wp_bsppolls
wp_bsppollvotes
New WordPress options
can_compress_scripts
db_upgraded
widget_pollwidget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by BuyHTTP Super Polls
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲12213.99 ▼0.723.23 ▲1.6439.42 ▲0.38
Dashboard /wp-admin2,233 ▲455.10 ▲0.06116.35 ▲1.0743.27 ▼5.59
Posts /wp-admin/edit.php2,121 ▲292.33 ▲0.3241.32 ▲1.3634.83 ▲0.80
Add New Post /wp-admin/post-new.php1,539 ▲517.94 ▼3.15676.07 ▲78.7634.91 ▼3.33
Media Library /wp-admin/upload.php1,412 ▲214.41 ▲0.18110.38 ▲7.0346.48 ▲4.26
Manage BSP /wp-admin/plugins.php?page=managebsp1,1032.7056.3828.78
BuyHTTP Super Polls /wp-admin/options-general.php?page=bsppolls8852.0526.1825.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/buyhttp-super-polls/bsp.pluginpage.php+72
    Declaration of Bsp_List_Table::column_default($item) should be compatible with WP_List_Table::column_default($item, $column_name)
  • Zombie tables were found after uninstall: 2 tables
    • wp_bsppollvotes
    • wp_bsppolls
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_pollwidget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bsppolls
    • > Warning in wp-content/plugins/buyhttp-super-polls/bsp.pluginpage.php+72
    Declaration of Bsp_List_Table::column_default($item) should be compatible with WP_List_Table::column_default($item, $column_name)
    • > GET request to /wp-admin/options-general.php?page=bsppolls
    • > Notice in wp-content/plugins/buyhttp-super-polls/bsp.settings.php+79
    Trying to access array offset on value of type bool

SRP 0% 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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/buyhttp-super-polls/bsp.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/buyhttp-super-polls/bsp.pluginpage.php on line 55
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/buyhttp-super-polls/bsp.pluginpage.php on line 55
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/buyhttp-super-polls/bsp.pluginpage.php on line 55
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/buyhttp-super-polls/bsp.widget.php:2

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: plugin, shortcode, ajax, voting, widget...

buyhttp-super-polls/bsp.php 92% from 13 tests

The principal PHP file in "BuyHTTP Super Polls" v. 1.1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("buyhttp-super-polls.php" instead of "bsp.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 detected706 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP714441704
JavaScript1082

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity6.00
▷ Minimum class complexity4.00
▷ Maximum class complexity8.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin