84% buddydrive

Code Review | BuddyDrive

WordPress plugin BuddyDrive scored84%from 54 tests.

About plugin

  • Plugin page: buddydrive
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.3.2
  • WordPress version: 6.3.1
  • First release: Apr 11, 2013
  • Latest release: Feb 1, 2020
  • Number of updates: 65
  • Update frequency: every 38.3 days
  • Top authors: imath (72.31%)mrpritchett (29.23%)

Code review

54 tests

User reviews

47 reviews

Install metrics

4,000+ active /230,850 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼8.70ms] Passed 4 tests

Analyzing server-side resources used by BuddyDrive
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2038.42 ▼0.53
Dashboard /wp-admin3.64 ▲0.3047.43 ▼11.62
Posts /wp-admin/edit.php3.69 ▲0.3443.07 ▼0.59
Add New Post /wp-admin/post-new.php6.16 ▲0.2781.20 ▼22.06
Media Library /wp-admin/upload.php3.50 ▲0.2738.27 ▲3.91

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by BuddyDrive
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.41 ▼0.131.87 ▲0.4245.17 ▲3.43
Dashboard /wp-admin2,198 ▲235.60 ▼0.0593.42 ▼11.4542.28 ▲2.45
Posts /wp-admin/edit.php2,100 ▲32.02 ▲0.0034.59 ▲0.3432.67 ▼4.29
Add New Post /wp-admin/post-new.php1,528 ▼023.26 ▲0.38637.58 ▼19.9454.34 ▼8.61
Media Library /wp-admin/upload.php1,397 ▼64.29 ▲0.10103.76 ▲5.1344.59 ▲0.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function buddydrive_item_id() in wp-content/plugins/buddydrive/templates/buddydrive-entry.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/buddydrive/templates/buddydrive.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/buddydrive/templates/buddydrive-loop.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/buddydrive/templates/buddydrive-default.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
3 plugin tags: folders, buddypress, files

buddydrive/buddydrive.php Passed 13 tests

"BuddyDrive" version 2.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
44 characters long description:
A plugin to share files, the BuddyPress way!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin11,068 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP212,0353,5736,498
JavaScript137861412,543
CSS822421,179
PO File1319402848

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity39.22
▷ Minimum class complexity11.00
▷ Maximum class complexity146.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods116
▷ Static methods1714.66%
▷ Public methods10590.52%
▷ Protected methods10.86%
▷ Private methods108.62%
Functions250
▷ Named functions250100.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
7 PNG files occupy 0.24MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png57.35KB18.84KB▼ 67.14%
screenshot-5.png66.71KB21.67KB▼ 67.52%
screenshot-1.png49.81KB16.47KB▼ 66.92%
includes/images/camera.png1.48KB0.82KB▼ 44.74%
includes/images/folder.png0.51KB0.56KB0.00%