88% buddypress-activity-privacy

Code Review | BuddyPress Activity Privacy

WordPress plugin BuddyPress Activity Privacy scored88%from 54 tests.

About plugin

  • Plugin page: buddypress-activi...
  • Plugin version: 1.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: WP 3.4, BuddyPress 1.5+
  • WordPress version: 6.3.1
  • First release: May 2, 2013
  • Latest release: Nov 27, 2015
  • Number of updates: 79
  • Update frequency: every 11.9 days
  • Top authors: megainfo (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

400+ active /53,902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by BuddyPress Activity Privacy
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.44 ▼7.48
Dashboard /wp-admin3.31 ▲0.0062.63 ▲10.35
Posts /wp-admin/edit.php3.36 ▲0.0047.27 ▲0.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.20 ▼12.03
Media Library /wp-admin/upload.php3.23 ▲0.0037.68 ▲3.15

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for BuddyPress Activity Privacy
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.012.37 ▲0.5542.39 ▼2.90
Dashboard /wp-admin2,192 ▲155.49 ▼0.0989.42 ▼14.7340.70 ▼4.57
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0334.37 ▼6.1831.50 ▼4.98
Add New Post /wp-admin/post-new.php1,526 ▼023.33 ▲0.03684.32 ▲53.9159.03 ▼3.83
Media Library /wp-admin/upload.php1,403 ▲64.17 ▼0.0394.14 ▼10.2242.88 ▼4.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 76% from 29 tests

readme.txt 75% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #3 (**Integration with BuddyPress Follow plugin ** - Allow your users select a visibility level (My Followers) for the activity posted in the profile.), #4 (**Integration with BuddyPress Follow plugin for groups ** - Allow your users select a visibility level (My Followers In Group ) for the activity posted in the group.), #5 (**Integration with BuddyPress Activity Plus plugin** - Allow your users select a visibility level for the activity posted with Buddypress Activity plus.), #6 (**Member can update the privacy of the old activity stream (new selectbox in activity meta).)
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires at least: Version format is invalid
  • Tested up to: Version format is invalid
The official readme.txt is a good inspiration

buddypress-activity-privacy/loader.php 77% from 13 tests

The main PHP file in "BuddyPress Activity Privacy" ver. 1.3.8 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "WP 3.4, BuddyPress 1.5")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("buddypress-activity-privacy.php" instead of "loader.php")

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
Good job! No executable or dangerous file extensions detected4,235 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PO File75978871,811
PHP104504601,574
SVG100414
JavaScript37046319
CSS3369117

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity45.50
▷ Minimum class complexity16.00
▷ Maximum class complexity75.00
Average method complexity7.85
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions52
▷ Named functions52100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.32MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/badge.png21.44KB6.67KB▼ 68.87%
screenshot-3.png25.86KB11.14KB▼ 56.92%
screenshot-5.png30.79KB11.50KB▼ 62.64%
screenshot-6.png50.98KB22.30KB▼ 56.27%
screenshot-4.png24.06KB10.37KB▼ 56.89%