10% post-avatar

Code Review | Post Avatar

WordPress plugin Post Avatar scored10%from 54 tests.

About plugin

  • Plugin page: post-avatar
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.6.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9.8
  • WordPress version: 6.3.1
  • First release: May 25, 2007
  • Latest release: Aug 23, 2018
  • Number of updates: 84
  • Update frequency: every 49.1 days
  • Top authors: garinungkadol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /86,861 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/post-avatar/gkl-postavatar.php+522
    Trying to access array offset on value of type null

Server metrics [RAM: ▼1.81MB] [CPU: ▼53.87ms] Passed 4 tests

This is a short check of server-side resources used by Post Avatar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.285.08 ▼32.90
Dashboard /wp-admin2.20 ▼1.106.50 ▼44.01
Posts /wp-admin/edit.php2.20 ▼1.156.92 ▼49.65
Add New Post /wp-admin/post-new.php2.20 ▼3.687.51 ▼88.91
Media Library /wp-admin/upload.php2.20 ▼1.035.72 ▼31.94

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
gkl_postavatar
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Avatar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.58 ▼0.804.43 ▲2.2045.19 ▲6.15
Dashboard /wp-admin2,210 ▲194.85 ▼0.23105.67 ▲4.7038.63 ▼4.67
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0540.72 ▼1.3536.92 ▼1.72
Add New Post /wp-admin/post-new.php6,278 ▲4,73626.18 ▲7.96949.50 ▲319.4449.96 ▼1.13
Media Library /wp-admin/upload.php1,395 ▲44.19 ▲0.0197.99 ▼7.0342.00 ▼3.64
Post Avatar /wp-admin/settings.php260.440.0914.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/post-avatar/gkl-postavatar.php+522
    Trying to access array offset on value of type null
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • gkl_postavatar
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/settings.php
    • > Network (severe)
    wp-admin/settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

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
5 plugin tags: thumbnail, image, images, post, avatars

post-avatar/gkl-postavatar.php 85% from 13 tests

The main file in "Post Avatar" v. 1.6.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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
  • Main file name: Name the main plugin file the same as the plugin slug ("post-avatar.php" instead of "gkl-postavatar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,657 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PO File123663831,163
PHP3135322449
JavaScript16032
CSS16213

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/next.png0.39KB0.35KB▼ 9.62%
images/missing_avatar.png3.88KB2.55KB▼ 34.20%
images/no_avatar.png4.04KB2.66KB▼ 34.19%
images/prev.png0.38KB0.34KB▼ 9.25%