83% favhero-favicon-generator

Code Review | Heroic Favicon Generator

WordPress plugin Heroic Favicon Generator scored83%from 54 tests.

About plugin

  • Plugin page: favhero-favicon-g...
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Nov 18, 2013
  • Latest release: May 16, 2022
  • Number of updates: 26
  • Update frequency: every 119.4 days
  • Top authors: herothemes (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

10,000+ active /80,960 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.27MB] [CPU: ▲0.29ms] Passed 4 tests

A check of server-side resources used by Heroic Favicon Generator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2640.44 ▼2.01
Dashboard /wp-admin3.58 ▲0.2755.17 ▲2.25
Posts /wp-admin/edit.php3.69 ▲0.3355.55 ▲6.15
Add New Post /wp-admin/post-new.php6.16 ▲0.2796.81 ▲0.89
Media Library /wp-admin/upload.php3.50 ▲0.2739.22 ▲0.02
Heroic Favicon Generator /wp-admin/options-general.php?page=ht-ultimate-favicon-options3.4940.58

Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/favhero-favicon-generator/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
_ht_favicons_key
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Heroic Favicon Generator: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲6113.62 ▼0.762.22 ▼0.1238.34 ▼5.78
Dashboard /wp-admin2,222 ▲195.84 ▼0.17108.42 ▼10.1444.81 ▼0.84
Posts /wp-admin/edit.php2,107 ▲72.04 ▼0.0240.53 ▼0.7337.45 ▲0.37
Add New Post /wp-admin/post-new.php1,557 ▲318.21 ▼0.14606.67 ▼42.9052.28 ▼3.43
Media Library /wp-admin/upload.php1,407 ▲74.19 ▼0.0598.10 ▼12.7246.07 ▲0.67
Heroic Favicon Generator /wp-admin/options-general.php?page=ht-ultimate-favicon-options1,3793.0240.3975.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • _ht_favicons_key
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/favhero-favicon-generator/php/ht-ultimate-favicon-settings.php:344
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/favhero-favicon-generator/ht-ultimate-favicon.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: favourites, icon, generator, favicon

favhero-favicon-generator/ht-ultimate-favicon.php 85% from 13 tests

"Heroic Favicon Generator" version 1.7.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("favhero-favicon-generator.php" instead of "ht-ultimate-favicon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,600 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP42532351,437
CSS124086
JavaScript1211241
PO File1101136

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.42
Average class complexity66.50
▷ Minimum class complexity14.00
▷ Maximum class complexity183.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods76
▷ Static methods5471.05%
▷ Public methods76100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/favicon-default.png4.59KB2.36KB▼ 48.62%