10% buddypress-foaf

Code Review | Buddypress Friend of a Friend (FOAF)

WordPress plugin Buddypress Friend of a Friend (FOAF) scored10%from 54 tests.

About plugin

  • Plugin page: buddypress-foaf
  • Plugin version: 2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.1
  • WordPress version: 6.3.1
  • First release: Jan 20, 2014
  • Latest release: Nov 7, 2016
  • Number of updates: 64
  • Update frequency: every 17.1 days
  • Top authors: quan_flo (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

50+ active /16,314 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/buddypress-foaf/buddypress-foaf.php+228
    Methods with the same name as their class will not be constructors in a future version of PHP; BuddypressFOAF_Widget_Random has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼49.52ms] Passed 4 tests

An overview of server-side resources used by Buddypress Friend of a Friend (FOAF)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.1810.89 ▼29.34
Dashboard /wp-admin2.29 ▼1.0111.05 ▼40.43
Posts /wp-admin/edit.php2.29 ▼1.069.83 ▼41.39
Add New Post /wp-admin/post-new.php2.29 ▼3.5914.14 ▼85.14
Media Library /wp-admin/upload.php2.29 ▼0.948.59 ▼31.11

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Buddypress Friend of a Friend (FOAF)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.42 ▲0.031.97 ▼0.0543.60 ▲0.52
Dashboard /wp-admin2,189 ▲155.49 ▼0.1187.76 ▼5.1241.23 ▼2.50
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0935.64 ▼5.2835.65 ▼4.65
Add New Post /wp-admin/post-new.php1,545 ▲1423.07 ▼0.16654.99 ▼21.2349.04 ▼13.18
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.0297.95 ▼8.4842.40 ▼4.83

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
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in BuddypressFOAF_Widget_Random is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_buddypressfoaf-widget-random
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

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
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-foaf/buddypress-foaf.php:16

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)
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #2, #3 in buddypress-foaf/assets to your readme.txt
You can look at the official readme.txt

buddypress-foaf/buddypress-foaf.php 92% from 13 tests

The main PHP file in "Buddypress Friend of a Friend (FOAF)" ver. 2.7 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 210 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin299 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15175242
PO File1152057

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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