90% buddypress-admin-only-profile-fields

Code Review | BuddyPress Admin Only Profile Fields

WordPress plugin BuddyPress Admin Only Profile Fields scored90%from 54 tests.

About plugin

  • Plugin page: buddypress-admin-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2015
  • Latest release: Nov 3, 2015
  • Number of updates: 20
  • Update frequency: every 14.8 days
  • Top authors: A5hleyRich (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /6,121 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by BuddyPress Admin Only Profile Fields
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.27 ▼0.90
Dashboard /wp-admin3.31 ▼0.0349.89 ▼17.03
Posts /wp-admin/edit.php3.37 ▲0.0149.65 ▲3.06
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.79 ▼10.07
Media Library /wp-admin/upload.php3.24 ▲0.0139.80 ▲3.88

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

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

Browser metrics Passed 4 tests

BuddyPress Admin Only Profile Fields: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.69 ▲0.481.87 ▼0.2849.75 ▲6.47
Dashboard /wp-admin2,198 ▲215.57 ▼0.0987.88 ▼4.6040.25 ▼4.28
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0237.89 ▲0.7536.12 ▼0.42
Add New Post /wp-admin/post-new.php1,526 ▼023.09 ▼0.06684.23 ▲11.5353.29 ▲1.11
Media Library /wp-admin/upload.php1,400 ▲34.12 ▼0.04112.28 ▲16.7147.16 ▲1.53

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
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: buddypress, visibility, hidden, field, admin...

buddypress-admin-only-profile-fields/bp-admin-only-profile-fields.php 92% from 13 tests

The entry point to "BuddyPress Admin Only Profile Fields" version 1.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("buddypress-admin-only-profile-fields.php" instead of "bp-admin-only-profile-fields.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
Everything looks great! No dangerous files found in this plugin122 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP135107103
JavaScript26019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods562.50%
▷ Protected methods00.00%
▷ Private methods337.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin