68% buddystream

Code Review | BuddyStream

WordPress plugin BuddyStream scored68%from 54 tests.

About plugin

  • Plugin page: buddystream
  • Plugin version: 3.2.7
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 30, 2010
  • Latest release: May 27, 2016
  • Number of updates: 148
  • Update frequency: every 14.7 days
  • Top authors: blackphantom (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

10+ active /58,965 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.62MB] [CPU: ▼47.99ms] Passed 4 tests

This is a short check of server-side resources used by BuddyStream
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.38 ▼1.0910.04 ▼29.72
Dashboard /wp-admin2.39 ▼0.9212.06 ▼37.49
Posts /wp-admin/edit.php2.39 ▼0.9712.37 ▼36.75
Add New Post /wp-admin/post-new.php2.39 ▼3.5012.73 ▼88.01
Media Library /wp-admin/upload.php2.39 ▼0.8412.14 ▼19.92

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 136 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_buddystream_connect_widget
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for BuddyStream
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.81 ▲0.411.81 ▲0.0744.81 ▲2.44
Dashboard /wp-admin2,209 ▲185.85 ▲0.81106.20 ▲3.4942.52 ▲0.54
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0437.40 ▲1.2833.74 ▲0.72
Add New Post /wp-admin/post-new.php1,538 ▼423.04 ▲4.85667.03 ▲3.5656.75 ▼7.86
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0495.60 ▼7.2043.30 ▼0.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in BuddyStream_Connect_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_buddystream_connect_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/buddystream/extensions/youtube/templates/AdminMenu.php
    • > /wp-content/plugins/buddystream/extensions/default/templates/TemplateHeader.php
    • > /wp-content/plugins/buddystream/extensions/twitter/import.php
  • 151× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      include(): Failed opening 'BP_BUDDYSTREAM_DIR/extensions/default/templates/AdminUsers.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/buddystream/extensions/youtube/templates/AdminUsers.php on line 3
    • > PHP Warning
      Use of undefined constant BP_BUDDYSTREAM_URL - assumed 'BP_BUDDYSTREAM_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/buddystream/extensions/default/templates/TemplateHeader.php on line 2
    • > PHP Notice
      Undefined index: submit in wp-content/plugins/buddystream/extensions/default/templates/General.php on line 13
    • > PHP Warning
      Use of undefined constant BP_BUDDYSTREAM_URL - assumed 'BP_BUDDYSTREAM_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/buddystream/extensions/default/templates/TemplateHeader.php on line 5
    • > PHP Warning
      Use of undefined constant BP_BUDDYSTREAM_URL - assumed 'BP_BUDDYSTREAM_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/buddystream/extensions/flickr/templates/AdminSettings.php on line 2
    • > PHP Warning
      Use of undefined constant BP_BUDDYSTREAM_URL - assumed 'BP_BUDDYSTREAM_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/buddystream/extensions/flickr/templates/AdminSettings.php on line 6
    • > PHP Warning
      Use of undefined constant BP_BUDDYSTREAM_DIR - assumed 'BP_BUDDYSTREAM_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/buddystream/extensions/flickr/templates/AdminUsers.php on line 3
    • > PHP Warning
      Use of undefined constant BP_BUDDYSTREAM_URL - assumed 'BP_BUDDYSTREAM_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/buddystream/extensions/lastfm/templates/AdminStatitics.php on line 2
    • > PHP Warning
      Use of undefined constant BP_BUDDYSTREAM_URL - assumed 'BP_BUDDYSTREAM_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/buddystream/extensions/default/templates/TemplateHeader.php on line 2
    • > PHP Warning
      Use of undefined constant BP_BUDDYSTREAM_URL - assumed 'BP_BUDDYSTREAM_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/buddystream/extensions/youtube/templates/AdminStatitics.php on line 7

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Tested up to: Version not formatted correctly
  • Requires at least: Version not formatted correctly
The official readme.txt is a good inspiration

buddystream/buddystream.php Passed 13 tests

The main PHP script in "BuddyStream" version 3.2.7 is automatically included on every request by WordPress
11 characters long description:
BuddyStream

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin15,159 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
CSS5180747,306
PHP571,4949924,699
JavaScript58054042,496
PO File6312515626
INI551532

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.27
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes29.09%
▷ Concrete classes2090.91%
▷ Final classes00.00%
Methods146
▷ Static methods106.85%
▷ Public methods13592.47%
▷ Protected methods21.37%
▷ Private methods96.16%
Functions77
▷ Named functions77100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
45 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
extensions/default/buddybox/images/ie6/borderBottomCenter.png0.15KB0.18KB0.00%
extensions/default/buddybox/images/ie6/borderTopLeft.png0.35KB0.50KB0.00%
extensions/default/img/facebook.png3.27KB0.63KB▼ 80.80%
extensions/lastfm/icon.png0.93KB0.09KB▼ 90.01%
extensions/default/counter_background.png1.26KB0.43KB▼ 65.87%