78% wp-favicons

Code Review | WP Favicons plug-in

WordPress plugin WP Favicons plug-in scored 78% from 54 tests.

About plugin

  • Plugin page: wp-favicons
  • Plugin version: 0.6.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.3
  • WordPress version: 6.3.1
  • First release: Jan 27, 2011
  • Latest release: Jun 20, 2012
  • Number of updates: 223
  • Update frequency: every 2.3 days
  • Top authors: cogmios (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 17,135 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼14.84ms] Passed 4 tests

Analyzing server-side resources used by WP Favicons plug-in
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2838.24 ▼3.59
Dashboard /wp-admin3.52 ▲0.2237.44 ▼12.65
Posts /wp-admin/edit.php3.64 ▲0.2839.81 ▼10.67
Add New Post /wp-admin/post-new.php5.77 ▼0.1276.01 ▼32.43
Media Library /wp-admin/upload.php3.52 ▲0.3034.31 ▲3.17
Server Settings /wp-admin/admin.php?page=wp_favicons_client_xmlrpcserver_page3.4932.67
Context /wp-admin/admin.php?page=wp_favicons_client_context_page3.4934.68
Icon Client /wp-admin/admin.php?page=WP-Favicons-Client-Menu3.4931.19

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Favicons plug-in
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,768 ▲1113.26 ▼1.491.11 ▼0.9424.84 ▼18.83
Dashboard /wp-admin2,261 ▲735.11 ▲0.23108.67 ▼4.7471.16 ▲30.76
Posts /wp-admin/edit.php2,159 ▲702.00 ▼0.0236.26 ▼4.6230.93 ▼9.12
Add New Post /wp-admin/post-new.php1,585 ▲4317.64 ▼0.58791.56 ▲161.5165.12 ▲6.67
Media Library /wp-admin/upload.php1,455 ▲734.14 ▼0.03102.69 ▼1.2652.13 ▲8.91
Server Settings /wp-admin/admin.php?page=wp_favicons_client_xmlrpcserver_page9002.0329.7325.37
Context /wp-admin/admin.php?page=wp_favicons_client_context_page9861.7127.1223.47
Icon Client /wp-admin/admin.php?page=WP-Favicons-Client-Menu8352.0730.3127.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=WP-Favicons-Client-Menu
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 37× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'leau\\co\\wp_favicons_server\\Plugin' not found in wp-content/plugins/wp-favicons/includes/server/plugins/information/logfile.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'leau\\co\\wp_favicons_server\\default_generic_plugin' not found in wp-content/plugins/wp-favicons/includes/server/plugins/default/wavatar.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'leau\\co\\wp_favicons_server\\Plugin' not found in wp-content/plugins/wp-favicons/includes/server/plugins/metadata_favicon/empty_disk_cache.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'leau\\co\\wp_favicons_server\\MasterXMLRPC' not found in wp-content/plugins/wp-favicons/includes/server/class-uri-xmlrpc.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'leau\\co\\wp_favicons_client\\context_generic_plugin' not found in wp-content/plugins/wp-favicons/includes/client/plugins/context/get_comment_author_link.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'leau\\co\\wp_favicons_client\\context_generic_plugin' not found in wp-content/plugins/wp-favicons/includes/client/plugins/context/bookmark_list.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/wp-favicons/includes/server/plugins/statuscodes/class-list-table-status.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'leau\\co\\wp_favicons_server\\sources_generic_plugin' not found in wp-content/plugins/wp-favicons/includes/server/plugins/sources/google_s2.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'leau\\co\\wp_favicons_server\\Plugin' not found in wp-content/plugins/wp-favicons/includes/server/plugins/information/sources.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'leau\\co\\wp_favicons_server\\default_generic_plugin' not found in wp-content/plugins/wp-favicons/includes/server/plugins/default/retro.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Example of my sidebar "lifeline" (accidently these are all coming from my delicious account) see what differences it makes!), #2 (Example of my site: http://populair.eu : 4.5 million users really liked the layout with the icons to be much more useable (!))
You can take inspiration from this readme.txt

wp-favicons/wp-favicons-server.php 92% from 13 tests

The main PHP file in "WP Favicons plug-in" ver. 0.6.6 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-favicons.php" instead of "wp-favicons-server.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin5,730 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP589352,6965,702
XML10028

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.31
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes64
▷ Abstract classes812.50%
▷ Concrete classes5687.50%
▷ Final classes00.00%
Methods338
▷ Static methods14743.49%
▷ Public methods32395.56%
▷ Protected methods00.00%
▷ Private methods154.44%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants321.43%
▷ Class constants1178.57%
▷ Public constants11100.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
12 compressed PNG files occupy 0.11MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/server/config/img/wpfavicons.png0.29KB0.23KB▼ 18.84%
includes/server/img/200.png0.19KB0.17KB▼ 8.76%
includes/server/img/418.png0.73KB0.74KB0.00%
includes/server/img/400.png0.19KB0.17KB▼ 9.23%
includes/server/img/wpfavicons.png0.29KB0.23KB▼ 18.84%