10% cp-polls

Code Review | Polls CP

WordPress plugin Polls CP scored10%from 54 tests.

About plugin

  • Plugin page: cp-polls
  • Plugin version: 1.0.71
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-6.4
  • WordPress version: 6.3.1
  • First release: Oct 21, 2014
  • Latest release: Nov 7, 2023
  • Number of updates: 142
  • Update frequency: every 23.3 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /34,558 total downloads

Benchmarks

Plugin footprint 40% 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
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/cp-polls/classes/cp-base-class.inc.php+115
    Trying to get property 'form_structure' of non-object

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.32ms] Passed 4 tests

Analyzing server-side resources used by Polls CP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.18 ▲5.35
Dashboard /wp-admin3.33 ▲0.0352.50 ▲0.86
Posts /wp-admin/edit.php3.45 ▲0.0947.62 ▲1.84
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.31 ▼4.12
Media Library /wp-admin/upload.php3.26 ▲0.0333.76 ▲0.14
Upgrade /wp-admin/admin.php?page=CP_Polls_upgrade3.2030.40
CP Polls /wp-admin/options-general.php?page=CP_Polls3.3935.26
CP Polls /wp-admin/admin.php?page=CP_Polls3.2335.39

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 70 new files
Database: 2 new tables, 9 new options
New tables
wp_cppolls_forms
wp_cppolls_messages
New WordPress options
db_upgraded
widget_theysaidso_widget
autoptimize_js_exclude
CP_POLLS_last_verified
installed_cp-polls
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Polls CP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲5914.34 ▲0.071.67 ▼0.0043.28 ▲1.40
Dashboard /wp-admin2,226 ▲465.58 ▼0.1996.63 ▲5.2743.91 ▲2.13
Posts /wp-admin/edit.php2,128 ▲281.96 ▼0.0136.80 ▲1.9234.05 ▼2.40
Add New Post /wp-admin/post-new.php6,235 ▲4,70919.04 ▼3.95851.86 ▲115.4735.79 ▼22.41
Media Library /wp-admin/upload.php1,428 ▲254.23 ▲0.02100.19 ▼2.0443.35 ▼0.32
Upgrade /wp-admin/admin.php?page=CP_Polls_upgrade2,1742.4349.7181.31
CP Polls /wp-admin/options-general.php?page=CP_Polls1,3092.3540.8031.17
CP Polls /wp-admin/admin.php?page=CP_Polls1,3092.3438.8630.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 2 tables
    • wp_cppolls_forms
    • wp_cppolls_messages
  • This plugin does not fully uninstall, leaving 9 options in the database
    • autoptimize_js_exclude
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • installed_cp-polls
    • CP_POLLS_last_verified
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/cp-polls/js/fbuilder-loader-admin.php
    • > /wp-content/plugins/cp-polls/js/fbuilder-loader-public.php
    • > /wp-content/plugins/cp-polls/cp-public-int.inc.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cp-polls/cp_admin_int_edition.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cp-polls/cp-admin-int.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cp-polls/cp-admin-int-report.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cp-polls/cp-admin-int-message-list.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cp-polls/cp-admin-int-list.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cp-polls/cp-polls.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CP_POLLS_BaseClass' not found in wp-content/plugins/cp-polls/cp-main-class.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cp-polls/banner.php:102
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cp-polls/cp-feedback.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=CP_Polls_upgrade
    • > Javascript (severe) in unknown
    https://wordpress.dwbooster.com/TSScript/tab.js 37:11 Uncaught TypeError: Cannot read properties of undefined (reading 'replace')

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

cp-polls/cp-polls.php Passed 13 tests

"Polls CP" version 1.0.71's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
65 characters long description:
Create classic polls and advanced polls with dependant questions.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin6,863 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP145541163,154
JavaScript252741372,878
CSS463150742
PO File232089

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity110.50
▷ Minimum class complexity19.00
▷ Maximum class complexity202.00
Average method complexity7.64
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods3193.94%
▷ Protected methods00.00%
▷ Private methods26.06%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants46
▷ Global constants46100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png0.14KB0.17KB0.00%
css/cupertino/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%
css/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png0.12KB0.16KB0.00%
css/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png0.12KB0.18KB0.00%
css/cupertino/images/ui-icons_3d80b3_256x240.png5.23KB4.11KB▼ 21.49%