90% bp-local-avatars

Code Review | BP Local Avatars

WordPress plugin BP Local Avatars scored90%from 54 tests.

About plugin

  • Plugin page: bp-local-avatars
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2015
  • Latest release: Dec 23, 2022
  • Number of updates: 58
  • Update frequency: every 49.3 days
  • Top authors: shanebp (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /8,849 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
Install script ran successfully

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

An overview of server-side resources used by BP Local Avatars
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.66 ▼1.29
Dashboard /wp-admin3.32 ▼0.0353.60 ▼10.24
Posts /wp-admin/edit.php3.37 ▲0.0149.11 ▲0.94
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.57 ▼6.14
Media Library /wp-admin/upload.php3.24 ▲0.0133.63 ▼6.01

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for BP Local Avatars
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.23 ▼1.051.86 ▼0.0442.79 ▼0.42
Dashboard /wp-admin2,207 ▲195.79 ▲0.9196.78 ▼17.1837.99 ▼9.42
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0641.60 ▲5.5534.14 ▼1.71
Add New Post /wp-admin/post-new.php1,541 ▲823.06 ▲0.08601.88 ▼75.4751.01 ▼12.85
Media Library /wp-admin/upload.php1,395 ▲74.21 ▲0.0298.55 ▲1.1043.90 ▲0.31

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: avatars, gravatars, members, groups, buddypress

bp-local-avatars/loader.php 92% from 13 tests

The principal PHP file in "BP Local Avatars" v. 3.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bp-local-avatars.php" instead of "loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin218 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP412250218

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods654.55%
▷ Protected methods00.00%
▷ Private methods545.45%
Functions12
▷ Named functions12100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png2.92KB1.78KB▼ 38.87%