84% robohash-avatar

Code Review | RoboHash Avatar

WordPress plugin RoboHash Avatar scored 84% from 54 tests.

About plugin

  • Plugin page: robohash-avatar
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.2
  • WordPress version: 6.3.1
  • First release: Jul 9, 2011
  • Latest release: Apr 5, 2015
  • Number of updates: 16
  • Update frequency: every 85.4 days
  • Top authors: trepmal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,877 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.97ms] Passed 4 tests

A check of server-side resources used by RoboHash Avatar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.94 ▲3.32
Dashboard /wp-admin3.31 ▲0.0147.73 ▲4.56
Posts /wp-admin/edit.php3.36 ▲0.0146.99 ▼0.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.56 ▼10.20
Media Library /wp-admin/upload.php3.23 ▲0.0135.68 ▲3.07

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for RoboHash Avatar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.351.70 ▼0.3547.00 ▲2.95
Dashboard /wp-admin2,209 ▲175.85 ▲0.95106.70 ▼17.9240.33 ▼4.67
Posts /wp-admin/edit.php2,093 ▲12.00 ▲0.0139.93 ▼4.7838.20 ▲2.79
Add New Post /wp-admin/post-new.php1,533 ▼122.87 ▼0.16648.06 ▼34.3764.54 ▲3.11
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.1697.08 ▼5.7639.39 ▼1.27

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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)
Everything seems fine, however this is by no means an exhaustive test

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/robohash-avatar/robohash-avatar.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: robohash, avatar, gravatar

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

The principal PHP file in "RoboHash Avatar" v. 0.5 is loaded by WordPress automatically on each request
38 characters long description:
RoboHash characters as default avatars

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin95 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1264973
JavaScript19022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected