83% mb-simple-user-avatar

Code Review | MB Simple User Avatar

WordPress plugin MB Simple User Avatar scored 83% from 54 tests.

About plugin

  • Plugin page: mb-simple-user-av...
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 19, 2019
  • Latest release: Jan 12, 2020
  • Number of updates: 7
  • Update frequency: every 3.7 days
  • Top authors: MastaBaba (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 973 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by MB Simple User Avatar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.55 ▼4.11
Dashboard /wp-admin3.36 ▲0.0648.52 ▼5.58
Posts /wp-admin/edit.php3.41 ▲0.0547.24 ▼1.20
Add New Post /wp-admin/post-new.php5.94 ▲0.0595.27 ▼3.72
Media Library /wp-admin/upload.php3.29 ▲0.0535.69 ▼0.61

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by MB Simple User Avatar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲16513.64 ▼1.0110.54 ▲8.3441.73 ▼5.42
Dashboard /wp-admin2,209 ▲214.86 ▼1.05105.54 ▼11.3442.87 ▲0.41
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0537.34 ▼0.3636.56 ▲2.36
Add New Post /wp-admin/post-new.php1,534 ▼023.17 ▼0.42647.27 ▲40.5354.97 ▲7.33
Media Library /wp-admin/upload.php1,385 ▼04.31 ▲0.1097.46 ▼13.0541.56 ▼2.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mb-simple-user-avatar/mb-simple-user-avatar.php:32

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

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Requires at least: Version format is invalid
The official readme.txt is a good inspiration

mb-simple-user-avatar/mb-simple-user-avatar.php 85% from 13 tests

The entry point to "MB Simple User Avatar" version 0.0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected329 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP17150247
JavaScript118058
CSS14024

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
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

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