83% buddypress-profile-visitors

Code Review | Buddypress Profile Visitors

WordPress plugin Buddypress Profile Visitors scored83%from 54 tests.

About plugin

  • Plugin page: buddypress-profil...
  • Plugin version: 1.9.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.5
  • WordPress version: 6.3.1
  • First release: Dec 15, 2014
  • Latest release: Nov 2, 2020
  • Number of updates: 20
  • Update frequency: every 108.7 days
  • Top authors: chaladi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,342 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▲8.18ms] Passed 4 tests

Server-side resources used by Buddypress Profile Visitors
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0149.93 ▲2.49
Dashboard /wp-admin3.31 ▲0.0174.07 ▲23.43
Posts /wp-admin/edit.php3.36 ▲0.0152.05 ▲2.29
Add New Post /wp-admin/post-new.php5.89 ▲0.01116.34 ▲29.45
Media Library /wp-admin/upload.php3.23 ▲0.0136.92 ▲4.51

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: 1 new table, 6 new options
New tables
wp_bp_profile_visitors
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Buddypress Profile Visitors: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.27 ▼1.125.54 ▲3.0369.55 ▲7.79
Dashboard /wp-admin2,205 ▲174.83 ▼0.98170.90 ▲63.8771.71 ▲29.87
Posts /wp-admin/edit.php2,091 ▼12.01 ▼0.0341.50 ▲2.3833.81 ▼2.52
Add New Post /wp-admin/post-new.php1,516 ▼417.65 ▼5.49771.23 ▲121.4262.96 ▲5.93
Media Library /wp-admin/upload.php1,384 ▲24.24 ▲0.05101.46 ▲4.6144.62 ▲1.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-profile-visitors/includes/bp_views_core.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-profile-visitors/buddypress_profile_visitors.php:84

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Preview)
Please take inspiration from this readme.txt

buddypress-profile-visitors/buddypress_profile_visitors.php 85% from 13 tests

The entry point to "Buddypress Profile Visitors" version 1.9.5 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("buddypress-profile-visitors.php" instead of "buddypress_profile_visitors.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 161 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin237 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23740188
CSS19049

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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