83% bp-blog-avatar

Code Review | BuddyPress Blog Avatar

WordPress plugin BuddyPress Blog Avatar scored83%from 54 tests.

About plugin

  • Plugin page: bp-blog-avatar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 2, 2013
  • Latest release: Dec 2, 2013
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: anusharma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,568 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by BuddyPress Blog Avatar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.19 ▲1.23
Dashboard /wp-admin3.31 ▼0.0342.50 ▼13.63
Posts /wp-admin/edit.php3.36 ▲0.0144.08 ▲2.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0177.84 ▼21.43
Media Library /wp-admin/upload.php3.23 ▲0.0133.68 ▼1.97

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

BuddyPress Blog Avatar: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.251.73 ▼0.0842.30 ▼5.16
Dashboard /wp-admin2,206 ▲174.85 ▼0.10106.53 ▲0.7138.66 ▲2.64
Posts /wp-admin/edit.php2,086 ▼32.04 ▼0.0238.81 ▼1.4235.14 ▼2.17
Add New Post /wp-admin/post-new.php1,542 ▲1418.30 ▲0.20633.46 ▲24.4748.57 ▼1.64
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.0595.97 ▼4.3243.46 ▲3.47

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bp-blog-avatar/hooks.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-blog-avatar/blog-avatar.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-blog-avatar/admin/admin.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Requires at least: Version not formatted correctly
  • Tested up to: Version not formatted correctly
The official readme.txt is a good inspiration

bp-blog-avatar/blog-avatar.php 92% from 13 tests

The main PHP file in "BuddyPress Blog Avatar" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bp-blog-avatar.php" instead of "blog-avatar.php")

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
There were no executable files found in this plugin214 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity9.50
▷ Minimum class complexity4.00
▷ Maximum class complexity15.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods215.38%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ 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
PNG images were not found in this plugin