84% buddypress-first-letter-avatar

Code Review | BuddyPress First Letter Avatar

WordPress plugin BuddyPress First Letter Avatar scored84%from 54 tests.

About plugin

  • Plugin page: buddypress-first-...
  • Plugin version: 2.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Mar 6, 2015
  • Latest release: Mar 12, 2017
  • Number of updates: 31
  • Update frequency: every 23.8 days
  • Top authors: Dev49.net (74.19%)DanielAGW (29.03%)

Code review

54 tests

User reviews

16 reviews

Install metrics

300+ active /25,256 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 gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼4.71ms] Passed 4 tests

Server-side resources used by BuddyPress First Letter Avatar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.73 ▼1.27
Dashboard /wp-admin3.47 ▲0.1652.86 ▼4.60
Posts /wp-admin/edit.php3.58 ▲0.2252.59 ▼3.11
Add New Post /wp-admin/post-new.php6.05 ▲0.1698.58 ▼9.87
Media Library /wp-admin/upload.php3.39 ▲0.1643.52 ▲5.40
BuddyPress First Letter Avatar /wp-admin/options-general.php?page=buddypress_first_letter_avatar3.3632.51

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 1,465 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
bpfla_settings
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by BuddyPress First Letter Avatar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.29 ▼0.081.55 ▲0.0143.75 ▼0.77
Dashboard /wp-admin2,216 ▲395.59 ▲0.0687.34 ▲1.7679.06 ▲31.71
Posts /wp-admin/edit.php2,118 ▲151.97 ▼0.0340.50 ▼3.1238.11 ▼4.87
Add New Post /wp-admin/post-new.php1,539 ▲1323.65 ▼0.01721.22 ▲29.1654.76 ▲0.94
Media Library /wp-admin/upload.php1,412 ▲124.13 ▼0.0897.40 ▼6.0369.89 ▲29.26
BuddyPress First Letter Avatar /wp-admin/options-general.php?page=buddypress_first_letter_avatar1,0172.1125.3529.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=buddypress_first_letter_avatar
    • > Network (severe)
    http://i2.wp.com/wp.com/wp-content/plugins/buddypress-first-letter-avatar/images/default/96/latin_a.png - Failed to load resource: the server responded with a status of 404 (File Not Found)
    • > GET request to /wp-admin/options-general.php?page=buddypress_first_letter_avatar
    • > Network (severe)
    http://i2.wp.com/wp.com/wp-content/plugins/buddypress-first-letter-avatar/images/default/48/latin_a.png - Failed to load resource: the server responded with a status of 404 (File Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
Please take inspiration from this readme.txt

buddypress-first-letter-avatar/buddypress-first-letter-avatar.php Passed 13 tests

The main PHP script in "BuddyPress First Letter Avatar" version 2.2.8 is automatically included on every request by WordPress
136 characters long description:
Set custom avatars for BuddyPress users. The avatar will be the first (or any other) letter of the user's name on a colorful background.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected853 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3219269616
PO File27286232
CSS14115

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity57.50
▷ Minimum class complexity9.00
▷ Maximum class complexity106.00
Average method complexity5.52
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2288.00%
▷ Protected methods00.00%
▷ Private methods312.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants00.00%
▷ Class constants13100.00%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1455 compressed PNG files occupy 1.30MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/roboto/256/greek_922.png1.02KB1.03KB0.00%
images/opensans/512/latin_j.png1.21KB1.06KB▼ 12.96%
images/roboto/128/cyrillic_1091.png0.63KB0.67KB0.00%
images/opensans/512/latin_d.png1.99KB2.26KB0.00%
images/default/512/cyrillic_1101.png2.35KB2.33KB▼ 0.87%