68% avatarplus

Code Review | AvatarPlus

WordPress plugin AvatarPlus scored68%from 54 tests.

About plugin

  • Plugin page: avatarplus
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Jan 29, 2013
  • Latest release: Feb 24, 2013
  • Number of updates: 15
  • Update frequency: every 1.7 days
  • Top authors: Ralf Albert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,622 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.81MB] [CPU: ▼25.11ms] Passed 4 tests

Server-side resources used by AvatarPlus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1848.31 ▲6.69
Dashboard /wp-admin3.20 ▼0.1156.45 ▲5.86
Posts /wp-admin/edit.php3.12 ▼0.2424.95 ▼26.27
Add New Post /wp-admin/post-new.php3.12 ▼2.7725.46 ▼71.70
Media Library /wp-admin/upload.php3.12 ▼0.1127.97 ▼8.31
AvatarPlus /wp-admin/options-general.php?page=avatarplus3.1223.40

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
avatarplus_options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

An overview of browser requirements for AvatarPlus
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,892 ▼86912.77 ▼1.962.51 ▲0.9143.29 ▼0.47
Dashboard /wp-admin1,279 ▼8981.48 ▼4.1413.94 ▼80.4636.17 ▼10.96
Posts /wp-admin/edit.php2,104 ▲41.95 ▲0.0138.80 ▲0.3543.16 ▲10.95
Add New Post /wp-admin/post-new.php1,543 ▲1523.20 ▼0.10689.52 ▼5.4040.86 ▼17.68
Media Library /wp-admin/upload.php1,407 ▲74.09 ▼0.08104.90 ▼4.9446.58 ▼0.61
AvatarPlus /wp-admin/options-general.php?page=avatarplus8532.0127.4926.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=avatarplus
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AvatarPlus\\add_action() in wp-content/plugins/avatarplus/avatarplus.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
2 plugin tags: comments, avatar

avatarplus/avatarplus.php Passed 13 tests

The main file in "AvatarPlus" v. 0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
114 characters long description:
Replacing the standard avatar in comments with a Google+, Facebook or Twitter avatar if a user enter a profile url

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected865 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP6417556744
PO File1184055
Markdown120038
HTML80028

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity23.25
▷ Minimum class complexity6.00
▷ Maximum class complexity48.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods923.68%
▷ Public methods3797.37%
▷ Protected methods12.63%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants666.67%
▷ Class constants333.33%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin