68% kbucket

Code Review | KBucket: Your Curated Content in WordPress

WordPress plugin KBucket: Your Curated Content in WordPress scored68%from 54 tests.

About plugin

  • Plugin page: kbucket
  • Plugin version: 3.1.9
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 28, 2016
  • Latest release: Oct 26, 2023
  • Number of updates: 449
  • Update frequency: every 5.8 days
  • Top authors: bodhisatva (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /2,582 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲2.72MB] [CPU: ▲19.50ms] Passed 4 tests

Analyzing server-side resources used by KBucket: Your Curated Content in WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /6.20 ▲2.7366.54 ▲27.40
Dashboard /wp-admin6.04 ▲2.7369.20 ▲19.88
Posts /wp-admin/edit.php6.07 ▲2.7176.03 ▲37.82
Add New Post /wp-admin/post-new.php8.61 ▲2.72102.32 ▲3.03
Media Library /wp-admin/upload.php5.94 ▲2.7064.03 ▲27.69

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 104 new files
Database: 6 new tables, 16 new options
New tables
wp_kb_category
wp_kb_files
wp_kb_tag_details
wp_kb_tags
wp_kbucket
wp_kb_suggest
New WordPress options
widget_recent-comments
kb_auto_upload_image_hold
widget_theysaidso_widget
kb_settings
kb_setup_page_id
kb_auto_upload_stage
kb_auto_upload_logs
kb_auto_images_all
db_upgraded
widget_recent-posts
...

Browser metrics Passed 4 tests

Checking browser requirements for KBucket: Your Curated Content in WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,376 ▲61516.92 ▲2.7330.37 ▲28.7342.86 ▼1.30
Dashboard /wp-admin2,395 ▲2216.68 ▲1.10103.66 ▲14.6836.03 ▼3.25
Posts /wp-admin/edit.php2,326 ▲2293.90 ▲1.8749.00 ▲13.4331.43 ▼1.84
Add New Post /wp-admin/post-new.php1,581 ▲4623.38 ▼2.04655.07 ▲33.6936.21 ▼31.00
Media Library /wp-admin/upload.php1,462 ▲624.62 ▲0.4182.25 ▼12.2043.34 ▲2.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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: 6 tables
    • wp_kb_tag_details
    • wp_kbucket
    • wp_kb_files
    • wp_kb_tags
    • wp_kb_suggest
    • wp_kb_category
  • Zombie WordPress options detected upon uninstall: 16 options
    • theysaidso_admin_options
    • kb_auto_images
    • widget_kbauthortags
    • kb_auto_upload_image_hold
    • kb_auto_images_all
    • widget_recent-posts
    • kb_auto_upload_stage
    • kb_settings
    • kbucket_data
    • kb_auto_upload_file
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/kbucket/tabs/home.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/kbucket/tabs/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/kbucket/tabs/styles.php:2
    • > PHP Warning
      Use of undefined constant WPKB_PLUGIN_URL - assumed 'WPKB_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/kbucket/tabs/upload.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/kbucket/tabs/css.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function kb_get_settings() in wp-content/plugins/kbucket/tabs/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/kbucket/tabs/comments.php:2
    • > PHP Warning
      Use of undefined constant WPKB_PLUGIN_URL - assumed 'WPKB_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/kbucket/tabs/upload.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/kbucket/tabs/upload.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/kbucket/tabs/links.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/kbucket/tabs/social.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6 in kbucket/assets to your readme.txt
You can look at the official readme.txt

kbucket/KBucket.php 92% from 13 tests

The main file in "KBucket: Your Curated Content in WordPress" v. 3.1.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("kbucket.php" instead of "KBucket.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin57,597 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript215,1786,05825,007
PHP341,3662,69915,694
XML2102013,029
CSS136451523,867

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity61.12
▷ Minimum class complexity1.00
▷ Maximum class complexity555.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes15
▷ Abstract classes213.33%
▷ Concrete classes1386.67%
▷ Final classes00.00%
Methods275
▷ Static methods7326.55%
▷ Public methods23083.64%
▷ Protected methods4315.64%
▷ Private methods20.73%
Functions188
▷ Named functions17794.15%
▷ Anonymous functions115.85%
Constants13
▷ Global constants13100.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
23 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/colorpicker_hex.png0.52KB0.42KB▼ 19.92%
images/colorpicker_overlay.png10.11KB8.24KB▼ 18.50%
images/sort_asc_disabled.png2.85KB0.25KB▼ 91.36%
images/kshare.png26.22KB26.24KB0.00%
images/colorpicker_rgb_r.png1.04KB0.77KB▼ 26.17%