10% kkprogressbar

Code Review | KKProgressbar2 Free - advanced progress bars

WordPress plugin KKProgressbar2 Free - advanced progress bars scored10%from 54 tests.

About plugin

  • Plugin page: kkprogressbar
  • Plugin version: 1.1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.0
  • WordPress version: 6.3.1
  • First release: Jun 10, 2010
  • Latest release: May 23, 2012
  • Number of updates: 88
  • Update frequency: every 8.5 days
  • Top authors: Krzy-siek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /7,067 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
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/kkprogressbar/kkpb_prezentacja.php+5
    Function create_function() is deprecated

Server metrics [RAM: ▼1.79MB] [CPU: ▼55.07ms] Passed 4 tests

This is a short check of server-side resources used by KKProgressbar2 Free - advanced progress bars
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.275.15 ▼39.24
Dashboard /wp-admin2.21 ▼1.096.11 ▼45.33
Posts /wp-admin/edit.php2.21 ▼1.145.92 ▼41.82
Add New Post /wp-admin/post-new.php2.21 ▼3.676.26 ▼93.90
Media Library /wp-admin/upload.php2.21 ▼1.026.36 ▼30.60
Settings /wp-admin/admin.php?page=kkpb-settings2.217.58
KKProgressbar2 Free /wp-admin/admin.php?page=kkpb-menu2.216.30
Documentation /wp-admin/admin.php?page=kkpb-menu-documentation2.215.65
Changelog /wp-admin/admin.php?page=kkpb-menu-changelog2.217.21
Add/Edit Project /wp-admin/admin.php?page=kkpb-add-project2.216.52

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 135 new files
Database: 2 new tables, 9 new options
New tables
wp_kkpb_projekt
wp_kkpb_progress
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_kkprogressbar
widget_recent-comments
can_compress_scripts
widget_kkprogressbarprojects
kkpbsettings
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for KKProgressbar2 Free - advanced progress bars
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲21013.98 ▼0.639.21 ▲7.6540.88 ▼0.05
Dashboard /wp-admin2,254 ▲745.88 ▲0.2281.49 ▼7.8284.74 ▲42.56
Posts /wp-admin/edit.php2,171 ▲742.64 ▲0.6639.71 ▲4.1131.43 ▼12.99
Add New Post /wp-admin/post-new.php1,347 ▼17915.66 ▼8.10491.01 ▼185.8336.81 ▼12.81
Media Library /wp-admin/upload.php1,400 ▲64.52 ▲0.3493.35 ▼5.1971.97 ▲26.52
Settings /wp-admin/admin.php?page=kkpb-settings1,3774.1883.5797.14
KKProgressbar2 Free /wp-admin/admin.php?page=kkpb-menu1,1754.0773.8941.76
Documentation /wp-admin/admin.php?page=kkpb-menu-documentation1,2504.0669.1156.07
Changelog /wp-admin/admin.php?page=kkpb-menu-changelog1,2114.0770.4134.59
Add/Edit Project /wp-admin/admin.php?page=kkpb-add-project2,1148.73175.17103.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/kkprogressbar/kkpb_prezentacja.php+5
    Function create_function() is deprecated
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_kkpb_projekt
    • wp_kkpb_progress
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_kkprogressbar
    • widget_recent-comments
    • widget_recent-posts
    • kkpbsettings
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_kkprogressbarprojects

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kkpb-add-project
    • > Deprecated in wp-content/plugins/kkprogressbar/kkpb_prezentacja.php+94
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kkpb-add-project
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in kkprogressbarProjects is deprecated since version 4.3.0! Use __construct() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kkpb-add-project
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in kkprogressbar is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/admin.php?page=kkpb-settings
    • > Notice in wp-content/plugins/kkprogressbar/settings.php+42
    Undefined variable: project
    • > GET request to /wp-admin/admin.php?page=kkpb-settings
    • > Notice in wp-content/plugins/kkprogressbar/settings.php+42
    Trying to get property 'id' of non-object
    • > GET request to /wp-admin/admin.php?page=kkpb-settings
    • > Warning in wp-content/plugins/kkprogressbar/settings.php+206
    Illegal string offset 'project_info'
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kkpb-settings
    • > Notice in wp-content/plugins/kkprogressbar/settings.php+206
    Uninitialized string offset: 0
    • > GET request to /wp-admin/admin.php?page=kkpb-settings
    • > Warning in wp-content/plugins/kkprogressbar/settings.php+206
    Illegal string offset 'global_progress'
    • > GET request to /wp-admin/admin.php?page=kkpb-settings
    • > Warning in wp-content/plugins/kkprogressbar/settings.php+206
    Illegal string offset 'project_perc'
    • > GET request to /wp-admin/admin.php?page=kkpb-menu
    • > Deprecated in wp-content/plugins/kkprogressbar/admin-interface.php+132
    Non-static method kkpb::getAllProjects() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kkpb-menu
    • > Deprecated in wp-content/plugins/kkprogressbar/admin-interface.php+143
    Non-static method kkpb::getProgressbarsOnStatus() should not be called statically
    • > GET request to /wp-admin/admin.php?page=kkpb-add-project
    • > Notice in wp-content/plugins/kkprogressbar/add_progressbar.php+123
    Undefined variable: content
    • > GET request to /wp-admin/admin.php?page=kkpb-add-project
    • > Notice in wp-content/plugins/kkprogressbar/add_progressbar.php+138
    Undefined variable: value
    • > GET request to /wp-admin/admin.php?page=kkpb-add-project
    • > Notice in wp-content/plugins/kkprogressbar/add_progressbar.php+138
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=kkpb-add-project
    • > Notice in wp-content/plugins/kkprogressbar/add_progressbar.php+143
    Undefined variable: key

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 take a closer look at the following
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kkprogressbar/ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/kkprogressbar/kkpb_sidebar.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kkprogressbar/kkpb_admin.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/kkprogressbar/changelog.php:21
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/kkprogressbar/documentation.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kkprogressbar/admin-interface.php:320
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/kkprogressbar/documentation.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kkprogressbar/settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kkprogressbar/kkpb_prezentacja.php:3
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/kkprogressbar/changelog.php on line 13

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=kkpb-settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'msie')" "TypeError: Cannot read properties of undefined (reading 'msie')\n at $.\u003Ccomputed>.disableTextSelection (/wp-content/plugins/kkprogressbar/js/iphone-style-checkboxes.js?ver=6.3.1:54:20)\n at new $.\u003Ccomputed> (/wp-content/plugins/kkprogressbar/js/iphone-style-checkboxes.js?ver=6.3.1:20:8)\n at HTMLInputElement.\u003Canonymous> (/wp-content/plugins/kkprogressbar/js/iphone-style-checkboxes.js?ver=6.3.1:180:31)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1:2:3129)\n at e.\u003Ccomputed>.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1:2:1594)\n at $.fn.\u003Ccomputed> [as iphoneStyle] (/wp-content/plugins/kkprogressbar/js/iphone-style-checkboxes.js?ver=6.3.1:179:14)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/kkprogressbar/js/kkpb.js?ver=2.0.1:48:27)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=kkpb-settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kkpb-add-project
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/kkprogressbar/js/kkpb.js?ver=2.0.1:59:59)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1:2:27292)" undefined
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kkpb-add-project
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=kkpb-add-project
    • > Network (severe)
    wp-content/plugins/kkprogressbar/images/loading.gif - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=kkpb-add-project
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at Object.initialize (/wp-content/plugins/kkprogressbar/js/add-progressbar-form-min.js:1:724)\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=kkpb-add-project:165:21)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=kkpb-add-project
    • > Javascript (severe) in unknown
    /wp-includes/js/jquery/ui/autocomplete.min.js?ver=1.13.2 8:709 Uncaught TypeError: this._addClass is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Administration), #2 (Add progress bar), #3 (Article / Widget), #4 (Settings), #5 (Add project)
The official readme.txt is a good inspiration

kkprogressbar/kkpb_admin.php 85% from 13 tests

The main file in "KKProgressbar2 Free - advanced progress bars" v. 1.1.4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 613 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kkprogressbar.php" instead of "kkpb_admin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin14,995 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript151,9321,48010,773
CSS73152342,027
PHP11351451,915
PO File2172330280

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.23
Average class complexity12.25
▷ Minimum class complexity9.00
▷ Maximum class complexity15.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
79 PNG files occupy 0.49MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/colorpicker_submit.png0.96KB1.04KB0.00%
images/wstrzymany.png0.70KB0.65KB▼ 8.18%
images/aktywny.png0.71KB0.78KB0.00%
images/gallery_up.png3.55KB1.11KB▼ 68.78%
screenshot-2.png33.82KB14.07KB▼ 58.41%