79% svg-favicon

Code Review | SVG Favicon

WordPress plugin SVG Favicon scored79%from 54 tests.

About plugin

  • Plugin page: svg-favicon
  • Plugin version: 1.3
  • PHP compatiblity: 7.4.30+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 1, 2020
  • Latest release: Oct 12, 2023
  • Number of updates: 12
  • Update frequency: every 97.4 days
  • Top authors: a415production (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /10,054 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼4.32ms] Passed 4 tests

Server-side resources used by SVG Favicon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4342.07 ▲6.99
Dashboard /wp-admin3.71 ▲0.3748.21 ▼9.33
Posts /wp-admin/edit.php3.76 ▲0.4053.60 ▲10.31
Add New Post /wp-admin/post-new.php6.23 ▲0.3483.43 ▼16.86
Media Library /wp-admin/upload.php3.57 ▲0.3436.78 ▲1.93
SVG Favicon /wp-admin/themes.php?page=svg-favicon3.6933.70

Server storage [IO: ▲0.34MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

SVG Favicon: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.25 ▼1.107.53 ▲6.0341.24 ▲1.43
Dashboard /wp-admin2,196 ▲225.50 ▼0.1080.63 ▼4.2837.02 ▼7.17
Posts /wp-admin/edit.php2,104 ▲72.03 ▲0.0639.60 ▲5.4837.08 ▼1.95
Add New Post /wp-admin/post-new.php1,529 ▼1523.43 ▲5.13660.42 ▲29.8950.38 ▼17.14
Media Library /wp-admin/upload.php1,401 ▲14.26 ▲0.0593.49 ▼12.3144.92 ▲1.42
SVG Favicon /wp-admin/themes.php?page=svg-favicon1,6493.1053.2143.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/svg-favicon/vendor/enshrined/svg-sanitize/src/svg-scanner.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Trait 'FOF\\SVGFAVICON\\Traits\\Singleton' not found in wp-content/plugins/svg-favicon/inc/classes/KERNEL.php on line 19
    • > PHP Warning
      array_values() expects parameter 1 to be array, null given in wp-content/plugins/svg-favicon/vendor/enshrined/svg-sanitize/src/svg-scanner.php on line 70
    • > PHP Fatal error
      Uncaught Error: Interface 'enshrined\\svgSanitize\\data\\AttributeInterface' not found in wp-content/plugins/svg-favicon/vendor/enshrined/svg-sanitize/src/data/AllowedAttributes.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'enshrined\\svgSanitize\\data\\AllowedTags' not found in wp-content/plugins/svg-favicon/inc/classes/tools/SVGAllowedTags.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'enshrined\\svgSanitize\\data\\TagInterface' not found in wp-content/plugins/svg-favicon/vendor/enshrined/svg-sanitize/src/data/AllowedTags.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: svg favicon, dark mode, faviconico, svg, favicon

svg-favicon/svg-favicon.php Passed 13 tests

Analyzing the main PHP file in "SVG Favicon" version 1.3
41 characters long description:
Quickly upload a SVG favicon to your site

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
There were no executable files found in this plugin3,234 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP447491,0113,089
JSON20087
Markdown143049
JavaScript32275
CSS5044

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.33
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces14
Interfaces2
Traits1
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes00.00%
Methods177
▷ Static methods2916.38%
▷ Public methods13877.97%
▷ Protected methods2312.99%
▷ Private methods169.04%
Functions21
▷ Named functions314.29%
▷ Anonymous functions1885.71%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ 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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/remove.png1.68KB0.79KB▼ 52.97%
admin/images/information.png2.46KB0.62KB▼ 74.86%