10% buddydrives3

Code Review | BuddyDrive

WordPress plugin BuddyDrive scored10%from 54 tests.

About plugin

  • Plugin page: buddydrives3
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 22, 2013
  • Latest release: Jun 22, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: dbezborodov (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,627 total downloads

Benchmarks

Plugin footprint 58% 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
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/buddydrives3/includes/buddydrive-functions.php+234
    Uncaught Error: Call to undefined function bp_core_get_directory_page_ids() in wp-content/plugins/buddydrives3/includes/buddydrive-functions.php:234
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): buddydrive_activation()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.69ms] Passed 4 tests

This is a short check of server-side resources used by BuddyDrive
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.67 ▼6.35
Dashboard /wp-admin3.31 ▲0.0048.07 ▼4.25
Posts /wp-admin/edit.php3.36 ▲0.0048.33 ▼0.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.34 ▼10.52
Media Library /wp-admin/upload.php3.23 ▲0.0037.51 ▼1.64

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

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

Browser metrics Passed 4 tests

Checking browser requirements for BuddyDrive
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.06 ▼0.301.71 ▲0.0439.90 ▼4.05
Dashboard /wp-admin2,198 ▲245.63 ▲0.1091.01 ▼0.3937.34 ▼4.87
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0639.62 ▲2.4935.46 ▼4.91
Add New Post /wp-admin/post-new.php1,526 ▼023.02 ▼0.01652.43 ▼26.8555.20 ▲0.23
Media Library /wp-admin/upload.php1,397 ▼34.21 ▲0.00110.47 ▲6.0346.90 ▼2.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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 50% 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
The following issues need your attention
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/buddydrives3/templates/buddydrive-loop.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function buddydrive_item_id() in wp-content/plugins/buddydrives3/templates/buddydrive-entry.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function buddydrive_is_bp_default() in wp-content/plugins/buddydrives3/templates/buddydrive.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function buddydrive_is_bp_default() in wp-content/plugins/buddydrives3/templates/buddydrive-explorer.php:9

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 errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (User's BuddyDrive.), #2 (BuddyDrive Uploader), #3 (BuddyDrive embed file.), #4 (BuddyDrive Supervising area.), #5 (BuddyDrive settings page)
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

buddydrives3/buddydrive.php 85% from 13 tests

The entry point to "BuddyDrive" version 1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("buddydrives3.php" instead of "buddydrive.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin7,193 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP221,8633,0175,270
JavaScript329817915
PO File1245303680
CSS2420328

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity45.09
▷ Minimum class complexity1.00
▷ Maximum class complexity265.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods143
▷ Static methods5034.97%
▷ Public methods12587.41%
▷ Protected methods00.00%
▷ Private methods1812.59%
Functions190
▷ Named functions190100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 0.41MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png66.99KB19.72KB▼ 70.57%
includes/admin/images/menu.png6.91KB1.58KB▼ 77.19%
includes/images/folder-demo.png56.72KB15.53KB▼ 72.62%
includes/images/privacy-demo.png21.64KB6.29KB▼ 70.94%
screenshot-3.png55.53KB14.23KB▼ 74.38%