89% wordpress-custom-avatars-plugin

Code Review | Custom Avatars

WordPress plugin Custom Avatars scored89%from 54 tests.

About plugin

  • Plugin page: wordpress-custom-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 11, 2012
  • Latest release: May 30, 2023
  • Number of updates: 12
  • Update frequency: every 346.5 days
  • Top authors: fahdi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /8,182 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.20MB] [CPU: ▼18.21ms] Passed 4 tests

Server-side resources used by Custom Avatars
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0726.53 ▼12.52
Dashboard /wp-admin3.12 ▼0.1832.63 ▼18.07
Posts /wp-admin/edit.php3.25 ▼0.1038.21 ▼13.86
Add New Post /wp-admin/post-new.php5.45 ▼0.4475.06 ▼28.37
Media Library /wp-admin/upload.php3.19 ▼0.0430.32 ▼6.82

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Avatars
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.35 ▲0.161.80 ▲0.1838.82 ▼5.26
Dashboard /wp-admin2,200 ▲265.54 ▼0.1387.36 ▼8.1280.03 ▲35.35
Posts /wp-admin/edit.php2,114 ▲141.96 ▼0.0035.82 ▼0.1436.89 ▲0.59
Add New Post /wp-admin/post-new.php1,536 ▲823.54 ▲0.52708.15 ▲57.8652.97 ▼14.32
Media Library /wp-admin/upload.php1,414 ▲204.23 ▲0.08107.46 ▲8.8477.98 ▲32.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
Even though no errors were found, this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Shows the random avatar.) image missing
You can look at the official readme.txt

wordpress-custom-avatars-plugin/wp-custom-avatars.php 85% from 13 tests

"Custom Avatars" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 210 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wordpress-custom-avatars-plugin.php" instead of "wp-custom-avatars.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected88 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1133762
Markdown118026

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.62
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
Screenshot-1.png27.75KB8.86KB▼ 68.08%