84% avatar-manager

Code Review | Avatar Manager

WordPress plugin Avatar Manager scored84%from 54 tests.

About plugin

  • Plugin page: avatar-manager
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.6
  • WordPress version: 6.3.1
  • First release: Jan 29, 2013
  • Latest release: Feb 2, 2021
  • Number of updates: 61
  • Update frequency: every 48.0 days
  • Top authors: cdog (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

10,000+ active /109,249 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
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲0.20ms] Passed 4 tests

Analyzing server-side resources used by Avatar Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2056.13 ▲11.38
Dashboard /wp-admin3.46 ▲0.1547.00 ▼3.05
Posts /wp-admin/edit.php3.57 ▲0.2150.05 ▼0.48
Add New Post /wp-admin/post-new.php6.04 ▲0.1599.03 ▼0.57
Media Library /wp-admin/upload.php3.38 ▲0.1539.70 ▲4.89

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Avatar Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,168 ▲43315.15 ▲0.5631.81 ▲29.8543.94 ▼4.20
Dashboard /wp-admin2,209 ▲184.87 ▼1.0396.39 ▼5.1539.85 ▼1.98
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0239.68 ▼0.5836.21 ▼0.88
Add New Post /wp-admin/post-new.php1,542 ▲2818.30 ▲0.40606.89 ▼119.7946.07 ▼15.21
Media Library /wp-admin/upload.php1,388 ▼34.16 ▼0.0287.52 ▼9.7741.45 ▼1.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/avatar-manager/avatar-manager.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === avatar-manager === )
You can take inspiration from this readme.txt

avatar-manager/avatar-manager.php Passed 13 tests

The main PHP script in "Avatar Manager" version 1.6.1 is automatically included on every request by WordPress
103 characters long description:
Avatar Manager for WordPress is a sweet and simple plugin for storing avatars locally and more. Easily.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,365 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP3241606697
PO File8216240604
JavaScript2211346
CSS20018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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