84% favicon-by-realfavicongenerator

Code Review | Favicon by RealFaviconGenerator

WordPress plugin Favicon by RealFaviconGenerator scored84%from 54 tests.

About plugin

  • Plugin page: favicon-by-realfa...
  • Plugin version: 1.3.28
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3.2
  • WordPress version: 6.3.1
  • First release: May 5, 2014
  • Latest release: Nov 4, 2023
  • Number of updates: 252
  • Update frequency: every 13.8 days
  • Top authors: phbernard (100%)

Code review

54 tests

User reviews

758 reviews

Install metrics

200,000+ active /2,840,661 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼3.75ms] Passed 4 tests

A check of server-side resources used by Favicon by RealFaviconGenerator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.34 ▼3.74
Dashboard /wp-admin3.57 ▲0.2747.56 ▼6.05
Posts /wp-admin/edit.php3.62 ▲0.2752.68 ▲5.52
Add New Post /wp-admin/post-new.php6.09 ▲0.2084.59 ▼10.72
Media Library /wp-admin/upload.php3.43 ▲0.2041.03 ▲6.15
Favicon /wp-admin/options-general.php?page=favicon-by-realfavicongenerator/admin/class-favicon-by-realfavicongenerator-admin.phpfavicon_settings_menu3.4033.11
Favicon /wp-admin/themes.php?page=favicon-by-realfavicongenerator/admin/class-favicon-by-realfavicongenerator-admin.phpfavicon_appearance_menu3.4737.82

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Favicon by RealFaviconGenerator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3614.29 ▲0.051.66 ▼0.1437.90 ▼6.80
Dashboard /wp-admin2,203 ▲265.60 ▼0.0492.93 ▲3.1140.72 ▼5.43
Posts /wp-admin/edit.php2,108 ▲51.95 ▼0.0138.87 ▼3.3938.24 ▲1.15
Add New Post /wp-admin/post-new.php1,532 ▲623.18 ▲0.03684.42 ▼4.7754.85 ▼0.53
Media Library /wp-admin/upload.php1,402 ▲54.20 ▲0.0597.19 ▼5.8642.40 ▼0.49
Favicon /wp-admin/options-general.php?page=favicon-by-realfavicongenerator/admin/class-favicon-by-realfavicongenerator-admin.phpfavicon_settings_menu8142.0026.5726.54
Favicon /wp-admin/themes.php?page=favicon-by-realfavicongenerator/admin/class-favicon-by-realfavicongenerator-admin.phpfavicon_appearance_menu1,0283.1144.4124.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • 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
Almost there! Just fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/favicon-by-realfavicongenerator/public/class-favicon-by-realfavicongenerator.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/favicon-by-realfavicongenerator/admin/views/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/favicon-by-realfavicongenerator/admin/views/appearance.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/favicon-by-realfavicongenerator/admin/views/keep_active_notice.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/favicon-by-realfavicongenerator/admin/class-favicon-by-realfavicongenerator-admin.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

favicon-by-realfavicongenerator/favicon-by-realfavicongenerator.php Passed 13 tests

The main PHP script in "Favicon by RealFaviconGenerator" version 1.3.28 is automatically included on every request by WordPress
131 characters long description:
Create and install your favicon for all platforms: PC/Mac of course, but also iPhone/iPad, Android devices, Windows 8 tablets, etc.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin2,523 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP93022631,359
PO File93814361,161
CSS1113

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity36.00
▷ Minimum class complexity2.00
▷ Maximum class complexity57.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods84
▷ Static methods910.71%
▷ Public methods7994.05%
▷ Protected methods00.00%
▷ Private methods55.95%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants38
▷ Global constants1539.47%
▷ Class constants2360.53%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected