74% comment-name-avatar

Code Review | Comment Name Avatar

WordPress plugin Comment Name Avatar scored 74% from 54 tests.

About plugin

  • Plugin page: comment-name-avatar
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 27, 2018
  • Latest release: Apr 27, 2018
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: amit648 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 662 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.96MB] [CPU: ▼52.70ms] Passed 4 tests

Analyzing server-side resources used by Comment Name Avatar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.56 ▼33.49
Dashboard /wp-admin2.05 ▼1.265.53 ▼41.99
Posts /wp-admin/edit.php2.05 ▼1.314.98 ▼41.80
Add New Post /wp-admin/post-new.php2.05 ▼3.845.20 ▼93.52
Media Library /wp-admin/upload.php2.05 ▼1.185.09 ▼30.90

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Comment Name Avatar: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲6613.23 ▼1.361.72 ▼0.0326.90 ▼16.33
Dashboard /wp-admin2,211 ▲205.86 ▲0.99112.19 ▲8.2640.27 ▼2.75
Posts /wp-admin/edit.php2,090 ▲12.03 ▼0.0240.95 ▲6.3034.31 ▲0.75
Add New Post /wp-admin/post-new.php1,534 ▲1323.37 ▲0.30629.46 ▼31.3550.34 ▼12.44
Media Library /wp-admin/upload.php1,392 ▲14.21 ▲0.0496.78 ▼6.0840.22 ▼5.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ABCL_change_avatar handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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 wp_enqueue_style() in wp-content/plugins/comment-name-avatar/comment-name-avatar.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === comment-name-avatar === )
The official readme.txt is a good inspiration

comment-name-avatar/comment-name-avatar.php Passed 13 tests

"Comment Name Avatar" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
79 characters long description:
This plugin shows comment author avatar look like skype avatar with short name.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected36 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1101324
CSS10012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png4.74KB3.21KB▼ 32.15%