84% simple-buddypress-profile-privacy

Code Review | Simple BuddyPress Profile Privacy

WordPress plugin Simple BuddyPress Profile Privacy scored84%from 54 tests.

About plugin

  • Plugin page: simple-buddypress...
  • Plugin version: 0.7.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2016
  • Latest release: Apr 23, 2019
  • Number of updates: 30
  • Update frequency: every 32.3 days
  • Top authors: Fencer04 (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

500+ active /20,268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.34ms] Passed 4 tests

This is a short check of server-side resources used by Simple BuddyPress Profile Privacy
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.58 ▼2.93
Dashboard /wp-admin3.31 ▲0.0146.33 ▼5.51
Posts /wp-admin/edit.php3.36 ▲0.0146.72 ▼3.45
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.29 ▼5.47
Media Library /wp-admin/upload.php3.23 ▲0.0133.54 ▼2.23

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Simple BuddyPress Profile Privacy
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.21 ▼1.091.67 ▼0.2438.14 ▼8.97
Dashboard /wp-admin2,208 ▲234.88 ▼0.98109.98 ▼4.5640.15 ▼4.88
Posts /wp-admin/edit.php2,091 ▲22.00 ▼0.0139.08 ▲1.7934.89 ▼0.64
Add New Post /wp-admin/post-new.php1,539 ▲518.31 ▼4.90591.50 ▼88.8254.87 ▲0.41
Media Library /wp-admin/upload.php1,390 ▲54.21 ▼0.0994.26 ▼11.6840.61 ▼1.45

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'BP_Component' not found in wp-content/plugins/simple-buddypress-profile-privacy/includes/buddypress-profile-privacy.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-buddypress-profile-privacy/loader.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-buddypress-profile-privacy/includes/buddypress-profile-privacy-admin.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: You can look at the official readme.txt

simple-buddypress-profile-privacy/loader.php 92% from 13 tests

"Simple BuddyPress Profile Privacy" version 0.7.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-buddypress-profile-privacy.php" instead of "loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected394 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34383271
PO File24246122
JavaScript1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
No PNG images were found in this plugin