68% buddypress-profile-view-from-admin

Code Review | Plugin Name: Buddypress profile view from admin

WordPress plugin Plugin Name: Buddypress profile view from admin scored68%from 54 tests.

About plugin

  • Plugin page: buddypress-profil...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: WordPress 2.9.1 / BuddyPress 1.2-3.6
  • WordPress version: 6.3.1
  • First release: Sep 10, 2013
  • Latest release: Sep 12, 2013
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: rameshwor.maharjan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,346 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼32.96ms] Passed 4 tests

This is a short check of server-side resources used by Plugin Name: Buddypress profile view from admin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.55 ▼2.81
Dashboard /wp-admin3.01 ▼0.3026.37 ▼27.91
Posts /wp-admin/edit.php3.01 ▼0.3527.37 ▼23.85
Add New Post /wp-admin/post-new.php3.01 ▼2.8828.81 ▼70.88
Media Library /wp-admin/upload.php3.01 ▼0.2227.96 ▼9.21
View Buddypress Profile /wp-admin/admin.php?page=view-edit-buddypress3.0130.16

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, 7 new options
New WordPress options
can_compress_scripts
recovery_mode_email_last_sent
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Plugin Name: Buddypress profile view from admin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲514.25 ▼0.011.74 ▼0.4641.99 ▼7.08
Dashboard /wp-admin2,197 ▲205.62 ▲0.0699.58 ▲7.1345.13 ▲1.78
Posts /wp-admin/edit.php2,105 ▲22.02 ▼0.0239.32 ▲2.5133.68 ▼4.21
Add New Post /wp-admin/post-new.php1,530 ▲422.89 ▼0.08695.85 ▼11.9556.23 ▼7.71
Media Library /wp-admin/upload.php1,399 ▼14.16 ▼0.23115.42 ▲10.0847.86 ▼1.86
View Buddypress Profile /wp-admin/admin.php?page=view-edit-buddypress6751.127.8417.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=view-edit-buddypress
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=view-edit-buddypress
    • > Notice in wp-content/plugins/buddypress-profile-view-from-admin/view.php+2
    Undefined index: user_id
    • > GET request to /wp-admin/admin.php?page=view-edit-buddypress
    • > Error in wp-content/plugins/buddypress-profile-view-from-admin/view.php+8
    Uncaught Error: Call to undefined function bp_core_get_user_domain() in wp-content/plugins/buddypress-profile-view-from-admin/view.php:8
    Stack trace:
    #0 wp-content/plugins/buddypress-profile-view-from-admin/buddy-profile-admin.php(85): include()
    #1 wp-includes/class-wp-hook.php(310): buddypress_profile_admin->view_edit_buddypress()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 50% from 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
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/buddypress-profile-view-from-admin/buddy-profile-admin.php:42
    • > PHP Notice
      Undefined index: user_id in wp-content/plugins/buddypress-profile-view-from-admin/view.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_userdata() in wp-content/plugins/buddypress-profile-view-from-admin/view.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === Plugin Name: Buddypress profile view from admin === )
Please take inspiration from this readme.txt

buddypress-profile-view-from-admin/buddy-profile-admin.php 85% from 13 tests

The principal PHP file in "Plugin Name: Buddypress profile view from admin" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: Required version number should only contain digits separated by dots (ex. "7.0" instead of "WordPress 2.9.1 / BuddyPress 1.2")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("buddypress-profile-view-from-admin.php" instead of "buddy-profile-admin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin155 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS19178
PHP2382777

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected