84% mutual-buddies

Code Review | Mutual Buddies

WordPress plugin Mutual Buddies scored84%from 54 tests.

About plugin

  • Plugin page: mutual-buddies
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Aug 4, 2015
  • Latest release: Jul 22, 2017
  • Number of updates: 58
  • Update frequency: every 12.4 days
  • Top authors: pareshradadiya (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /14,036 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by Mutual Buddies
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.19 ▲0.59
Dashboard /wp-admin3.31 ▼0.0345.87 ▼11.42
Posts /wp-admin/edit.php3.36 ▲0.0146.67 ▲1.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.67 ▼13.63
Media Library /wp-admin/upload.php3.23 ▲0.0033.40 ▼1.05

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Mutual Buddies
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.10 ▼1.281.85 ▼0.8838.74 ▼3.23
Dashboard /wp-admin2,206 ▲245.79 ▼0.07109.66 ▲10.2838.04 ▼4.61
Posts /wp-admin/edit.php2,089 ▼02.16 ▲0.0339.66 ▲0.6034.78 ▼0.97
Add New Post /wp-admin/post-new.php1,514 ▼617.85 ▼5.07665.29 ▲3.5957.32 ▲3.53
Media Library /wp-admin/upload.php1,388 ▲34.19 ▲0.0094.50 ▼7.2740.33 ▼3.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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mutual-buddies/includes/bp-mutual-friends-cssjs.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mutual-buddies/buddypress-mutual-friends.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mutual-buddies/includes/bp-mutual-friends-ajax.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mutual-buddies/includes/bp-mutual-friends-functions.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mutual-buddies/includes/bp-mutual-friends-screens.php:31

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: buddypress, social, friendship, facebook, friends...

mutual-buddies/buddypress-mutual-friends.php 92% from 13 tests

The primary PHP file in "Mutual Buddies" version 2.1.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mutual-buddies.php" instead of "buddypress-mutual-friends.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,280 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript44632411,541
PHP9149345340
PO File54567238
CSS3141090
Markdown136071

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.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%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin