74% buddy-views

Code Review | Buddy Views

WordPress plugin Buddy Views scored74%from 54 tests.

About plugin

  • Plugin page: buddy-views
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Sep 29, 2015
  • Latest release: Jan 19, 2016
  • Number of updates: 7
  • Update frequency: every 16.7 days
  • Top authors: mehulkaklotar (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

60+ active /5,512 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.23ms] Passed 4 tests

Analyzing server-side resources used by Buddy Views
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0638.97 ▼2.03
Dashboard /wp-admin3.41 ▲0.1147.72 ▼0.76
Posts /wp-admin/edit.php3.46 ▲0.1143.97 ▼2.01
Add New Post /wp-admin/post-new.php5.95 ▲0.0781.83 ▼8.12
Media Library /wp-admin/upload.php3.27 ▲0.0536.23 ▲2.73

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 59 new files
Database: 1 new table, 8 new options
New tables
wp_rt_buddy_views_log
New WordPress options
RT_BUDDY_VIEWS_DB_VERSIONS
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_buddy_views_most_viewed_members
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Buddy Views
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.65 ▼0.757.95 ▲5.9442.93 ▼6.75
Dashboard /wp-admin2,210 ▲224.83 ▼0.30110.52 ▼5.7343.05 ▲0.72
Posts /wp-admin/edit.php2,090 ▼22.02 ▲0.0235.13 ▼0.0232.53 ▼1.51
Add New Post /wp-admin/post-new.php1,518 ▼1617.69 ▼5.47695.40 ▲23.7263.80 ▲4.31
Media Library /wp-admin/upload.php1,392 ▲44.24 ▲0.0596.49 ▼5.6842.04 ▼1.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 tables were found after uninstall: 1 table
    • wp_rt_buddy_views_log
  • Zombie WordPress options were found after uninstall: 8 options
    • RT_BUDDY_VIEWS_DB_VERSIONS
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_buddy_views_most_viewed_members

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_displayed_user_id() in wp-content/plugins/buddy-views/templates/bv-profile-view-chart.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddy-views/includes/lib/rt-lib.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/buddy-views/admin/classes/abstracts/abstract-buddy-views-widget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === buddy-views === )
The official readme.txt is a good inspiration

buddy-views/buddy-views.php Passed 13 tests

The primary PHP file in "Buddy Views" version 1.1 is used by WordPress to initiate all plugin functionality
24 characters long description:
BuddyPress Profile Views

Code Analysis 97% from 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 detected2,465 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP284071,2071,961
Markdown61900336
JavaScript489187
JSON40052
Sass23023
CSS30186

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 184)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity17.68
▷ Minimum class complexity1.00
▷ Maximum class complexity213.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity184.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes15.26%
▷ Concrete classes1894.74%
▷ Final classes00.00%
Methods91
▷ Static methods1112.09%
▷ Public methods8694.51%
▷ Protected methods00.00%
▷ Private methods55.49%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin