89% bp-default-group-avatar

Code Review | BuddyPress Default Group Avatar

WordPress plugin BuddyPress Default Group Avatar scored89%from 54 tests.

About plugin

  • Plugin page: bp-default-group-...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 19, 2012
  • Latest release: Dec 19, 2012
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: Mike_Cowobo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,072 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.27ms] Passed 4 tests

A check of server-side resources used by BuddyPress Default Group Avatar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.14 ▼0.15
Dashboard /wp-admin3.34 ▲0.0344.97 ▼4.27
Posts /wp-admin/edit.php3.39 ▲0.0347.44 ▲2.68
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.18 ▼14.02
Media Library /wp-admin/upload.php3.26 ▲0.0334.57 ▲1.37
BP Default Group Avatar /wp-admin/admin.php?page=group_avatar3.2230.88

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

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

Browser metrics Passed 4 tests

BuddyPress Default Group Avatar: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.48 ▲0.271.62 ▼0.3236.69 ▼8.43
Dashboard /wp-admin2,206 ▲144.87 ▼0.08124.95 ▲0.0054.65 ▲7.03
Posts /wp-admin/edit.php2,089 ▼01.98 ▲0.0139.89 ▼3.5435.06 ▲0.98
Add New Post /wp-admin/post-new.php1,546 ▲3218.14 ▲0.58592.62 ▼99.2179.44 ▲27.86
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.1297.28 ▼7.6442.35 ▼3.49
BP Default Group Avatar /wp-admin/admin.php?page=group_avatar8082.0225.5926.12

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
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

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 90% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Settings show the URL input and a preview of your image.) image not found
  • Requires at least: Version format is invalid
  • Tested up to: Version format is invalid
You can look at the official readme.txt

bp-default-group-avatar/bp-default-group-avatar.php Passed 13 tests

Analyzing the main PHP file in "BuddyPress Default Group Avatar" version 0.2
42 characters long description:
Adds a default group avatar to BuddyPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin132 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23384132

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity8.50
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods1184.62%
▷ Protected methods215.38%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png39.33KB19.14KB▼ 51.35%