84% better-avatars

Code Review | Better Avatars

WordPress plugin Better Avatars scored84%from 54 tests.

About plugin

  • Plugin page: better-avatars
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Dec 2, 2012
  • Latest release: Dec 2, 2012
  • Number of updates: 10
  • Update frequency: every 83.8 days
  • Top authors: pathawks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,761 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.19MB] [CPU: ▼20.04ms] Passed 4 tests

Server-side resources used by Better Avatars
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0628.15 ▼12.99
Dashboard /wp-admin3.13 ▼0.1831.42 ▼19.09
Posts /wp-admin/edit.php3.26 ▼0.1031.34 ▼12.75
Add New Post /wp-admin/post-new.php5.45 ▼0.4368.95 ▼35.34
Media Library /wp-admin/upload.php3.19 ▼0.0328.44 ▼3.23

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Better Avatars: 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 ▲4313.59 ▼0.701.71 ▼0.3743.05 ▼2.74
Dashboard /wp-admin2,209 ▲245.85 ▼0.03100.90 ▲2.0938.23 ▼6.80
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0233.31 ▼4.9835.16 ▲5.13
Add New Post /wp-admin/post-new.php1,534 ▼823.16 ▲4.92647.76 ▲29.1960.44 ▼0.60
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.0196.84 ▼1.7441.29 ▼1.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/better-avatars/better-avatars.php:81

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: facebook, twitter, disqus, avatars, gmail...

better-avatars/better-avatars.php Passed 13 tests

The main PHP file in "Better Avatars" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
55 characters long description:
Tries hard to pull in avatars from Facebook and Twitter

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected49 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1161649

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.65
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin