84% wp-social-avatar

Code Review | WP Social Avatar

WordPress plugin WP Social Avatar scored84%from 54 tests.

About plugin

  • Plugin page: wp-social-avatar
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-4.5
  • WordPress version: 6.3.1
  • First release: Feb 26, 2014
  • Latest release: Jun 21, 2016
  • Number of updates: 43
  • Update frequency: every 19.7 days
  • Top authors: marutim (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /17,142 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲1.22ms] Passed 4 tests

Analyzing server-side resources used by WP Social Avatar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0547.35 ▼1.04
Dashboard /wp-admin3.35 ▲0.0548.39 ▼2.03
Posts /wp-admin/edit.php3.40 ▲0.0553.07 ▲1.24
Add New Post /wp-admin/post-new.php5.93 ▲0.05102.40 ▲6.72
Media Library /wp-admin/upload.php3.27 ▲0.0543.94 ▲9.56
WP Avatar /wp-admin/users.php?page=wp-avatar3.3232.06

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Social Avatar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.56 ▼0.791.76 ▼0.6941.42 ▼7.96
Dashboard /wp-admin2,210 ▲225.85 ▲0.81105.23 ▼13.0539.26 ▼3.42
Posts /wp-admin/edit.php2,093 ▲72.01 ▼0.0241.56 ▲6.3134.89 ▲3.62
Add New Post /wp-admin/post-new.php1,540 ▼323.09 ▲4.77670.91 ▲9.1461.88 ▲8.80
Media Library /wp-admin/upload.php1,392 ▲74.25 ▲0.05100.30 ▼2.8441.94 ▼2.57
WP Avatar /wp-admin/users.php?page=wp-avatar8552.0224.8325.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-social-avatar/wp-avatar.php:24

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: gravatar, social, social avatar, avatar

wp-social-avatar/wp-avatar.php 92% from 13 tests

"WP Social Avatar" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-social-avatar.php" instead of "wp-avatar.php")

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
Success! There were no dangerous files found in this plugin194 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13791169
JavaScript12525

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions8
▷ Named functions8100.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
No PNG images were found in this plugin