10% wp-bucket

Code Review | WP Bucket

WordPress plugin WP Bucket scored10%from 54 tests.

About plugin

  • Plugin page: wp-bucket
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.6
  • WordPress version: 6.3.1
  • First release: Feb 7, 2014
  • Latest release: Feb 7, 2014
  • Number of updates: 5
  • Update frequency: every 6.0 days
  • Top authors: rss_samuel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /782 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▼1.64MB] [CPU: ▼49.19ms] Passed 4 tests

An overview of server-side resources used by WP Bucket
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.35 ▼1.117.04 ▼41.33
Dashboard /wp-admin2.37 ▼0.946.55 ▼39.10
Posts /wp-admin/edit.php2.37 ▼0.996.49 ▼39.92
Add New Post /wp-admin/post-new.php2.37 ▼3.527.73 ▼76.39
Media Library /wp-admin/upload.php2.37 ▼0.8610.78 ▼22.48

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP Bucket
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.17 ▼1.181.91 ▼0.0441.73 ▼5.34
Dashboard /wp-admin2,203 ▲155.81 ▼0.2596.64 ▼9.4441.70 ▼5.05
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0339.25 ▼0.8035.39 ▼1.60
Add New Post /wp-admin/post-new.php1,534 ▲2023.38 ▲5.79599.58 ▼4.4145.78 ▼8.05
Media Library /wp-admin/upload.php1,388 ▲64.22 ▲0.0398.41 ▼0.7841.23 ▼1.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-bucket/inc/OAuth.class.php+101
    Array and string offset access syntax with curly braces is deprecated
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-bucket/wp_bucket.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_OAuth' not found in wp-content/plugins/wp-bucket/inc/WP_Bucket.class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wb_get_user_info() in wp-content/plugins/wp-bucket/pages/wp-bucket-test.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_page_by_path() in wp-content/plugins/wp-bucket/pages/login-by-bitbucket.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Create a Bitbucket Application and applying WP Bucket setting.), #2 (WP Bucket test page( http://yoursite.com/wp-bucket-test/ ).)
The official readme.txt might help

wp-bucket/wp_bucket.php 85% from 13 tests

The principal PHP file in "WP Bucket" v. 0.1.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-bucket.php" instead of "wp_bucket.php")
  • Description: The description should be shorter than 140 characters (currently 297 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,698 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP64484841,447
CSS120141
PO File22730101
Markdown1509

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.86
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes214.29%
▷ Concrete classes1285.71%
▷ Final classes00.00%
Methods105
▷ Static methods109.52%
▷ Public methods9287.62%
▷ Protected methods43.81%
▷ Private methods98.57%
Functions17
▷ Named functions1058.82%
▷ Anonymous functions741.18%
Constants4
▷ Global constants4100.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
8 PNG files occupy 0.15MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
pages/css/images/error.png3.08KB0.41KB▼ 86.66%
pages/css/images/download.png3.13KB0.33KB▼ 89.42%
pages/css/images/info.png3.14KB0.55KB▼ 82.57%
pages/css/images/notice.png2.86KB0.27KB▼ 90.60%
screenshot-2.png27.68KB27.13KB▼ 1.99%