68% bwl-poll-manager-lite

Code Review | BWL Poll Manager Lite

WordPress plugin BWL Poll Manager Lite scored68%from 54 tests.

About plugin

  • Plugin page: bwl-poll-manager-...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4+-6.4
  • WordPress version: 6.3.1
  • First release: Mar 6, 2019
  • Latest release: Nov 19, 2023
  • Number of updates: 12
  • Update frequency: every 143.3 days
  • Top authors: xenioushk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,067 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.43MB] [CPU: ▲1.84ms] Passed 4 tests

Server-side resources used by BWL Poll Manager Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3238.70 ▲1.90
Dashboard /wp-admin3.78 ▲0.4349.32 ▼6.68
Posts /wp-admin/edit.php3.90 ▲0.5451.93 ▲4.65
Add New Post /wp-admin/post-new.php6.37 ▲0.4898.13 ▲7.47
Media Library /wp-admin/upload.php3.70 ▲0.4745.02 ▲13.73
Upgrade To Pro /wp-admin/edit.php?post_type=bwl_poll&page=bpm-welcome3.7036.45
Add New Poll /wp-admin/post-new.php?post_type=bwl_poll3.7446.17
All Poll /wp-admin/edit.php?post_type=bwl_poll3.7539.35

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 81 new files
Database: 1 new table, 8 new options
New tables
wp_bpm_vote_data
New WordPress options
theysaidso_admin_options
bpm_flash_rules_status
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
bpm_old_custom_slug
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for BWL Poll Manager Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲14214.49 ▲0.121.92 ▲0.2738.38 ▼4.00
Dashboard /wp-admin2,239 ▲584.92 ▼0.7597.70 ▼7.1676.82 ▲32.53
Posts /wp-admin/edit.php2,151 ▲512.39 ▲0.3943.69 ▲8.9937.38 ▲2.04
Add New Post /wp-admin/post-new.php1,738 ▲21222.22 ▼0.62651.31 ▼14.4238.14 ▼17.68
Media Library /wp-admin/upload.php1,470 ▲704.53 ▲0.33100.29 ▼0.2985.18 ▲41.10
Upgrade To Pro /wp-admin/edit.php?post_type=bwl_poll&page=bpm-welcome1,3232.0929.2649.13
Add New Poll /wp-admin/post-new.php?post_type=bwl_poll2,8043.6191.9079.44
All Poll /wp-admin/edit.php?post_type=bwl_poll1,1902.4235.2029.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_bpm_vote_data
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • bpm_flash_rules_status
    • can_compress_scripts
    • bpm_old_custom_slug
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/bwl-poll-manager-lite/tinymce/bpm_shortcode_editor.php
    • > /wp-content/plugins/bwl-poll-manager-lite/option-panel/welcome-page.php
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bwl-poll-manager-lite/shortcode/bpm-shortcodes.php:3
    • > PHP Warning
      Use of undefined constant BWL_PM_PLUGIN_TITLE - assumed 'BWL_PM_PLUGIN_TITLE' (this will throw an Error in a future version of PHP) in wp-content/plugins/bwl-poll-manager-lite/option-panel/welcome-page.php on line 147
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bwl-poll-manager-lite/tinymce/bpm_tiny_mce_config.php:10
    • > PHP Warning
      Use of undefined constant BWL_PM_PLUGIN_DIR - assumed 'BWL_PM_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/bwl-poll-manager-lite/option-panel/welcome-page.php on line 126
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bwl-poll-manager-lite/includes/bpm-single-page.php:28
    • > PHP Warning
      Use of undefined constant BWL_PM_PLUGIN_DIR - assumed 'BWL_PM_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/bwl-poll-manager-lite/option-panel/welcome-page.php on line 127
    • > PHP Warning
      Use of undefined constant BWL_PM_PLUGIN_TITLE - assumed 'BWL_PM_PLUGIN_TITLE' (this will throw an Error in a future version of PHP) in wp-content/plugins/bwl-poll-manager-lite/option-panel/welcome-page.php on line 319
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bwl-poll-manager-lite/includes/bpm-quick-edit.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bwl-poll-manager-lite/includes/bpm-vote-counter.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bwl-poll-manager-lite/option-panel/bpm-admin-settings.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: vote, opinion, poll, option

bwl-poll-manager-lite/bwl-poll-manager-lite.php 85% from 13 tests

This is the main PHP file of "BWL Poll Manager Lite" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 230 characters long)
  • Requires at least: Required version number should only contain digits separated by dots (ex. "7.0" instead of "5.4+")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin11,192 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP171,2193987,872
JavaScript114332071,384
CSS9246781,339
SVG100414
PO File18394183

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity52.00
▷ Minimum class complexity21.00
▷ Maximum class complexity83.00
Average method complexity6.46
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions3597.22%
▷ Anonymous functions12.78%
Constants3
▷ Global constants3100.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
26 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/bpm-cmb-framework/admin/images/colorpicker/colorpicker_rgb_r.png1.04KB0.77KB▼ 26.17%
includes/bpm-cmb-framework/admin/images/colorpicker/colorpicker_hsb_s.png1.14KB0.80KB▼ 29.97%
includes/bpm-cmb-framework/admin/images/colorpicker/colorpicker_overlay.png10.11KB8.24KB▼ 18.50%
includes/bpm-cmb-framework/admin/images/colorpicker/colorpicker_rgb_b.png0.95KB0.76KB▼ 19.48%
includes/bpm-cmb-framework/admin/images/colorpicker/custom_hsb_s.png1.14KB0.89KB▼ 21.75%