84% minotar-minecraft-avatars

Code Review | Minotar

WordPress plugin Minotar scored84%from 54 tests.

About plugin

  • Plugin page: minotar-minecraft...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.6.0
  • WordPress version: 6.3.1
  • First release: May 13, 2011
  • Latest release: Aug 15, 2013
  • Number of updates: 21
  • Update frequency: every 39.3 days
  • Top authors: edvind (71.43%)clone1018 (33.33%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /14,256 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼7.44ms] Passed 4 tests

This is a short check of server-side resources used by Minotar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0232.69 ▼12.30
Dashboard /wp-admin3.31 ▼0.0358.20 ▼5.37
Posts /wp-admin/edit.php3.37 ▲0.0152.20 ▲1.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.46 ▼11.88
Media Library /wp-admin/upload.php3.24 ▲0.0136.84 ▼0.22

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
avatar_default_before_minotar
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Minotar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,779 ▲3314.35 ▲0.151.64 ▼0.2840.24 ▼4.21
Dashboard /wp-admin2,180 ▲35.50 ▼0.0894.64 ▲1.8579.47 ▲36.54
Posts /wp-admin/edit.php2,106 ▲91.97 ▲0.0238.52 ▲0.8934.30 ▼2.65
Add New Post /wp-admin/post-new.php1,679 ▲15121.91 ▼1.40672.54 ▲5.6246.57 ▼18.29
Media Library /wp-admin/upload.php1,400 ▲34.17 ▼0.13100.52 ▼4.8181.16 ▲35.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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 register_activation_hook() in wp-content/plugins/minotar-minecraft-avatars/minotar.php:182

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Example of comments with Minotar plugin activated) image required
The official readme.txt is a good inspiration

minotar-minecraft-avatars/minotar.php 92% from 13 tests

The main PHP script in "Minotar" version 1.6 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("minotar-minecraft-avatars.php" instead of "minotar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin77 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1595177

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods337.50%
▷ Public methods8100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin