74% cbxpoll

Code Review | CBX Poll

WordPress plugin CBX Poll scored 74% from 54 tests.

About plugin

  • Plugin page: cbxpoll
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9
  • WordPress version: 6.3.1
  • First release: May 31, 2016
  • Latest release: Jan 28, 2022
  • Number of updates: 40
  • Update frequency: every 51.7 days
  • Top authors: manchumahara (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 7,140 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼1.01ms] 75% from 4 tests

A check of server-side resources used by CBX Poll
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,958.18ms on /wp-admin/edit.php?post_type=cbxpoll&page=cbxpoll-help-support)
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.31 ▼2.85
Dashboard /wp-admin3.57 ▲0.2747.33 ▼1.75
Posts /wp-admin/edit.php3.62 ▲0.2754.14 ▲5.29
Add New Post /wp-admin/post-new.php6.11 ▲0.2392.75 ▼4.74
Media Library /wp-admin/upload.php3.43 ▲0.2040.86 ▲7.04
Add New /wp-admin/post-new.php?post_type=cbxpoll3.6355.94
Polls /wp-admin/edit.php?post_type=cbxpoll3.4842.16
Helps & Updates /wp-admin/edit.php?post_type=cbxpoll&page=cbxpoll-help-support5.141,958.18
Settings /wp-admin/edit.php?post_type=cbxpoll&page=cbxpollsetting3.4742.87

Server storage [IO: ▲1.77MB] [DB: ▲0.17MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 177 new files
Database: 1 new table, 12 new options
New tables
wp_cbxpoll_votes
New WordPress options
cbxpoll_email_setting
cbxpoll_global_settings
widget_theysaidso_widget
widget_recent-comments
widget_cbxpollsingle
can_compress_scripts
cbxpoll_slugs_settings
widget_recent-posts
theysaidso_admin_options
cbxpoll_use_php_sessions
...

Browser metrics Passed 4 tests

A check of browser resources used by CBX Poll
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲25413.60 ▼0.379.85 ▲7.8741.77 ▼7.36
Dashboard /wp-admin2,240 ▲525.87 ▲0.97108.88 ▲4.6370.65 ▲24.03
Posts /wp-admin/edit.php2,123 ▲342.00 ▼0.0237.86 ▲1.0532.38 ▼1.06
Add New Post /wp-admin/post-new.php6,578 ▲5,04427.02 ▲3.72931.74 ▲313.1339.20 ▼11.68
Media Library /wp-admin/upload.php1,419 ▲284.17 ▼0.01104.88 ▼1.0844.56 ▲0.81
Add New /wp-admin/post-new.php?post_type=cbxpoll3,1278.46248.39200.16
Polls /wp-admin/edit.php?post_type=cbxpoll1,2552.1133.1834.66
Helps & Updates /wp-admin/edit.php?post_type=cbxpoll&page=cbxpoll-help-support1,6962.0324.4345.18
Settings /wp-admin/edit.php?post_type=cbxpoll&page=cbxpollsetting2,8758.09172.8486.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_cbxpoll_votes
  • Zombie WordPress options were found after uninstall: 12 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • cbxpoll_slugs_settings
    • cbxpoll_tools
    • widget_cbxpollsingle
    • db_upgraded
    • widget_recent-posts
    • cbxpoll_global_settings
    • ...

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cbxpoll/includes/libraries/wp_session/wp-session.php:90

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: poll, survey, contest, vote, quiz

cbxpoll/cbxpoll.php Passed 13 tests

The main file in "CBX Poll" v. 1.2.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
34 characters long description:
Poll and vote system for WordPress

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
Success! There were no dangerous files found in this plugin25,093 lines of code in 135 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript803,6812,49514,634
PHP311,9533,0996,168
CSS15514752,295
Sass5337321,925
SVG40271

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity33.86
▷ Minimum class complexity1.00
▷ Maximum class complexity168.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes14.55%
Methods275
▷ Static methods5218.91%
▷ Public methods23685.82%
▷ Protected methods103.64%
▷ Private methods2910.55%
Functions25
▷ Named functions2496.00%
▷ Anonymous functions14.00%
Constants21
▷ Global constants1257.14%
▷ Class constants942.86%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
25 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png0.20KB0.08KB▼ 57.56%
assets/css/ui-lightness/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
assets/images/move.png2.81KB0.13KB▼ 95.49%
assets/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png0.26KB0.12KB▼ 53.44%