84% avatars

Code Review | Avatars

WordPress plugin Avatars scored 84% from 54 tests.

About plugin

  • Plugin page: avatars
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Aug 25, 2021
  • Latest release: Aug 25, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: bradparbs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,619 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.31ms] Passed 4 tests

An overview of server-side resources used by Avatars
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.99 ▼0.44
Dashboard /wp-admin3.31 ▲0.0052.66 ▼5.03
Posts /wp-admin/edit.php3.36 ▲0.0053.81 ▼3.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.14 ▼28.21
Media Library /wp-admin/upload.php3.23 ▲0.0036.94 ▲0.05

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Avatars
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲1413.34 ▼0.061.90 ▼0.0944.32 ▲2.61
Dashboard /wp-admin2,209 ▲34.78 ▼1.10103.48 ▼8.1344.32 ▲0.55
Posts /wp-admin/edit.php2,095 ▲32.01 ▲0.0037.11 ▼4.4434.12 ▼1.94
Add New Post /wp-admin/post-new.php1,539 ▲1923.11 ▼0.06702.15 ▲8.9262.97 ▲5.87
Media Library /wp-admin/upload.php1,394 ▲64.23 ▲0.0296.28 ▼16.2542.81 ▼4.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function NoAvatars\\add_action() in wp-content/plugins/avatars/avatars.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: avatars, gravatar, profile, admin

avatars/avatars.php 85% from 13 tests

The main PHP script in "Avatars" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/lang/" does not exist

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
Everything looks great! No dangerous files found in this plugin6 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13126

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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
Namespaces1
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%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
No PNG files were detected