94% buddypress-social

Code Review | BuddyPress Social

WordPress plugin BuddyPress Social scored 94% from 54 tests.

About plugin

  • Plugin page: buddypress-social
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-3.5.2
  • WordPress version: 5.8.1
  • First release: Jul 10, 2013
  • Latest release: Jul 20, 2013
  • Number of updates: 19
  • Update frequency: every 0.5 days
  • Top authors: Nit3watch (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active / 19,503 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼140.08ms] Passed 4 tests

A check of server-side resources used by BuddyPress Social
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1339.96 ▲9.68
Dashboard /wp-admin3.08 ▲0.0250.80 ▼8.18
Posts /wp-admin/edit.php3.13 ▲0.0249.80 ▲0.34
Add New Post /wp-admin/post-new.php5.43 ▲0.0098.13 ▼553.64
Media Library /wp-admin/upload.php3.02 ▲0.0235.74 ▲1.16

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for BuddyPress Social
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,852 ▲25617.36 ▲1.4015.48 ▲2.9945.24 ▲1.79
Dashboard /wp-admin3,007 ▲736.55 ▲0.57149.57 ▼14.32110.08 ▼6.17
Posts /wp-admin/edit.php2,776 ▲373.02 ▲0.3280.02 ▲6.3590.65 ▲5.78
Add New Post /wp-admin/post-new.php1,710 ▼1,84018.45 ▲3.73395.43 ▼113.64109.55 ▼4.90
Media Library /wp-admin/upload.php1,844 ▲345.38 ▲0.36150.62 ▼12.44116.19 ▼3.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-social/includes/activity-sharing.php:31
    • > PHP Notice
      Undefined variable: twittercj_members_extension_check in wp-content/plugins/buddypress-social/buddypress-social.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-social/admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/buddypress-social/buddypress-social.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-social/loader.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: buddypress, activity, twitter, facebook

buddypress-social/loader.php 85% from 13 tests

The main PHP script in "BuddyPress Social" version 2.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("buddypress-social.php" instead of "loader.php")
  • Description: The description should be shorter than 140 characters (currently 170 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected608 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS3836306
PHP47831260
SVG20030
JavaScript20012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin