68% dimbal-poll-manager

Code Review | Dimbal Poll Manager - Professional Version

WordPress plugin Dimbal Poll Manager - Professional Version scored 68% from 54 tests.

About plugin

  • Plugin page: dimbal-poll-manager
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Jun 30, 2015
  • Latest release: Jul 2, 2015
  • Number of updates: 22
  • Update frequency: every 1.3 days
  • Top authors: benhallbenhall (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,875 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.10MB] [CPU: ▼1.90ms] Passed 4 tests

Server-side resources used by Dimbal Poll Manager - Professional Version
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.52 ▲7.34
Dashboard /wp-admin3.43 ▲0.1346.57 ▼5.76
Posts /wp-admin/edit.php3.49 ▲0.1347.09 ▼4.84
Add New Post /wp-admin/post-new.php5.97 ▲0.0985.09 ▲0.95
Media Library /wp-admin/upload.php3.30 ▲0.0734.14 ▲2.04
Reports /wp-admin/admin.php?page=dimbal-dpm-pro-reports3.3032.82
Settings & Tools /wp-admin/admin.php?page=dimbal-dpm-pro-settings3.3238.79
Help & Support /wp-admin/admin.php?page=dimbal-dpm-pro-support3.3231.50
Poll Manager /wp-admin/admin.php?page=dimbal-dpm-pro-polls3.3028.45
Preview /wp-admin/admin.php?page=dimbal-dpm-pro-preview3.3029.19
Dimbal Polls /wp-admin/admin.php?page=dimbal-dpm-pro-home3.3230.47
Zone Manager /wp-admin/admin.php?page=dimbal-dpm-pro-zones3.3032.46

Server storage [IO: ▲0.47MB] [DB: ▲0.10MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 75 new files
Database: 5 new tables, 9 new options
New tables
wp_dimbal_poll_manager_zone
wp_dimbal_poll_manager_zone_item
wp_dimbal_poll_manager_poll_response
wp_dimbal_poll_manager_settings
wp_dimbal_poll_manager_poll_question
New WordPress options
theysaidso_admin_options
can_compress_scripts
dimbal-poll-manager-version
widget_dimbal-poll-manager
widget_recent-posts
widget_recent-comments
recovery_mode_email_last_sent
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Dimbal Poll Manager - Professional Version
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲6313.23 ▲0.041.71 ▼0.0743.69 ▼0.17
Dashboard /wp-admin2,255 ▲495.88 ▲0.06100.99 ▲2.8739.34 ▲0.33
Posts /wp-admin/edit.php2,141 ▲522.15 ▲0.1136.97 ▼1.4032.20 ▼3.77
Add New Post /wp-admin/post-new.php1,556 ▲4223.39 ▲5.88700.04 ▲11.8465.76 ▲10.53
Media Library /wp-admin/upload.php1,443 ▲524.16 ▼0.04107.50 ▲3.5045.17 ▼0.96
Reports /wp-admin/admin.php?page=dimbal-dpm-pro-reports9152.0727.6529.98
Settings & Tools /wp-admin/admin.php?page=dimbal-dpm-pro-settings1,0251.7128.6635.64
Help & Support /wp-admin/admin.php?page=dimbal-dpm-pro-support1,0482.8868.5332.54
Poll Manager /wp-admin/admin.php?page=dimbal-dpm-pro-polls9861.7127.0126.83
Preview /wp-admin/admin.php?page=dimbal-dpm-pro-preview7251.557.3217.50
Dimbal Polls /wp-admin/admin.php?page=dimbal-dpm-pro-home1,0271.7027.9624.82
Zone Manager /wp-admin/admin.php?page=dimbal-dpm-pro-zones9142.0424.3930.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 5 tables in the database
    • wp_dimbal_poll_manager_zone_item
    • wp_dimbal_poll_manager_zone
    • wp_dimbal_poll_manager_settings
    • wp_dimbal_poll_manager_poll_question
    • wp_dimbal_poll_manager_poll_response
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • dimbal-poll-manager-version
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_dimbal-poll-manager
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=dimbal-dpm-pro-preview
    • > Error in wp-content/plugins/dimbal-poll-manager/pages/dimbal-dpm-preview.php+16
    Uncaught Error: Undefined class constant 'PAGE_HOME' in wp-content/plugins/dimbal-poll-manager/pages/dimbal-dpm-preview.php:16
    Stack trace:
    #0 wp-content/plugins/dimbal-poll-manager/classes/class.Dimbal_DPM_PRO.php(60): include()
    #1 wp-includes/class-wp-hook.php(310): Dimbal_DPM_PRO::renderPage()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Dimbal_DPM_PRO' not found in wp-content/plugins/dimbal-poll-manager/pages/dimbal-dpm-settings.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Dimbal_DPM_PRO' not found in wp-content/plugins/dimbal-poll-manager/pages/dimbal-preview.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dimbal-poll-manager/classes/class.DimbalPollWidget_DPM_PRO.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Dimbal_DPM_PRO' not found in wp-content/plugins/dimbal-poll-manager/pages/dimbal-dpm-zones.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Dimbal_DPM_PRO' not found in wp-content/plugins/dimbal-poll-manager/pages/dimbal-dpm-support.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Dimbal_DPM_PRO' not found in wp-content/plugins/dimbal-poll-manager/pages/dimbal-dpm-polls.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'DimbalStandardLinkRecord_DPM_PRO' not found in wp-content/plugins/dimbal-poll-manager/classes/class.DimbalZoneItem_DPM_PRO.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Dimbal_DPM_PRO' not found in wp-content/plugins/dimbal-poll-manager/pages/dimbal-dpm-preview.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Dimbal_DPM_PRO' not found in wp-content/plugins/dimbal-poll-manager/pages/dimbal-dtm-support.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Dimbal_DPM_PRO' not found in wp-content/plugins/dimbal-poll-manager/pages/dimbal-tools.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: polls

dimbal-poll-manager/index.php 92% from 13 tests

"Dimbal Poll Manager - Professional Version" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dimbal-poll-manager.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin4,802 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP287539584,028
JavaScript2178158515
CSS25412259

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity31.27
▷ Minimum class complexity1.00
▷ Maximum class complexity169.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods192
▷ Static methods14173.44%
▷ Public methods192100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants89
▷ Global constants2022.47%
▷ Class constants6977.53%
▷ Public constants69100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
39 PNG files occupy 0.19MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/feed.png1.31KB1.41KB0.00%
images/information.png2.06KB1.65KB▼ 20.07%
images/server_components.png2.26KB1.64KB▼ 27.19%
images/comment.png1.16KB1.10KB▼ 4.72%
images/tick_grey.png1.57KB0.55KB▼ 64.74%