84% add-new-default-avatar

Code Review | Add New Default Avatar

WordPress plugin Add New Default Avatar scored 84% from 54 tests.

About plugin

  • Plugin page: add-new-default-a...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.4
  • WordPress version: 6.3.1
  • First release: Jun 10, 2010
  • Latest release: Feb 7, 2016
  • Number of updates: 35
  • Update frequency: every 59.1 days
  • Top authors: trepmal (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active / 47,356 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.99ms] Passed 4 tests

An overview of server-side resources used by Add New Default Avatar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.36 ▼6.46
Dashboard /wp-admin3.35 ▲0.0443.59 ▼5.44
Posts /wp-admin/edit.php3.40 ▲0.0452.91 ▲5.30
Add New Post /wp-admin/post-new.php5.92 ▲0.0496.76 ▲3.91
Media Library /wp-admin/upload.php3.27 ▲0.0435.80 ▲0.02

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add New Default Avatar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.23 ▼1.521.73 ▼0.2643.52 ▼2.95
Dashboard /wp-admin2,206 ▲184.85 ▼0.04106.34 ▲0.6140.48 ▼1.88
Posts /wp-admin/edit.php2,092 ▲61.97 ▼0.0238.58 ▼1.9935.74 ▲0.07
Add New Post /wp-admin/post-new.php1,533 ▼123.19 ▲0.15645.93 ▼30.3252.70 ▼3.08
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0593.17 ▼7.0142.43 ▼1.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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)
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/add-new-default-avatar/kl_addnewdefaultavatar.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: gravatar, avatar

add-new-default-avatar/kl_addnewdefaultavatar.php 92% from 13 tests

The primary PHP file in "Add New Default Avatar" version 1.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("add-new-default-avatar.php" instead of "kl_addnewdefaultavatar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin127 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13445115
JavaScript13212

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin