83% buddypress-default-group-avatar

Code Review | BuddyPress Group Default Avatar

WordPress plugin BuddyPress Group Default Avatar scored 83% from 54 tests.

About plugin

  • Plugin page: buddypress-defaul...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 5, 2012
  • Latest release: Feb 21, 2012
  • Number of updates: 10
  • Update frequency: every 1.7 days
  • Top authors: vernonfowler (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,907 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.75ms] Passed 4 tests

Analyzing server-side resources used by BuddyPress Group Default Avatar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.64 ▲0.83
Dashboard /wp-admin3.31 ▲0.0147.12 ▲1.44
Posts /wp-admin/edit.php3.36 ▲0.0143.79 ▼3.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.15 ▼13.31
Media Library /wp-admin/upload.php3.24 ▲0.0137.79 ▲1.44
BP Group Default Avatar /wp-admin/admin.php?page=group_avatar3.2031.28

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for BuddyPress Group Default Avatar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.24 ▼0.061.73 ▲0.1244.20 ▼0.75
Dashboard /wp-admin2,206 ▼35.90 ▲0.03109.69 ▲10.8341.31 ▲0.82
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0433.95 ▼0.7434.52 ▲0.46
Add New Post /wp-admin/post-new.php1,538 ▼623.70 ▲5.61650.30 ▲4.8454.65 ▲5.50
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0696.01 ▼18.8542.52 ▼5.57
BP Group Default Avatar /wp-admin/admin.php?page=group_avatar8082.0522.4323.85

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-default-group-avatar/buddypress-default-group-avatar.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tested up to: Version not formatted correctly
  • Screenshots: Please add an image for screenshot #1 (Settings show the URL input and a preview of your image.)
  • Requires at least: Version not formatted correctly
You can look at the official readme.txt

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

The principal PHP file in "BuddyPress Group Default Avatar" v. 0.1.1 is loaded by WordPress automatically on each request
42 characters long description:
Adds a default group avatar to BuddyPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin63 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP182663

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for 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%
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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png19.58KB9.17KB▼ 53.16%