72% wpfavicon

Code Review | WPFavicon

WordPress plugin WPFavicon scored72%from 54 tests.

About plugin

  • Plugin page: wpfavicon
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2.2
  • WordPress version: 6.3.1
  • First release: Jun 30, 2012
  • Latest release: Jun 30, 2019
  • Number of updates: 34
  • Update frequency: every 75.2 days
  • Top authors: nazmul.hossain.nihal (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /19,658 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
Installer ran successfully

Server metrics [RAM: ▼0.18MB] [CPU: ▼12.89ms] Passed 4 tests

An overview of server-side resources used by WPFavicon
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.40 ▼2.87
Dashboard /wp-admin3.13 ▼0.1730.46 ▼20.98
Posts /wp-admin/edit.php3.26 ▼0.0934.57 ▼10.44
Add New Post /wp-admin/post-new.php5.46 ▼0.4375.86 ▼13.45
Media Library /wp-admin/upload.php3.20 ▼0.0327.10 ▼6.70
Favicons /wp-admin/options-general.php?page=cwfav-options3.1124.95

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

WPFavicon: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8313.55 ▼0.831.70 ▼0.0538.92 ▼8.45
Dashboard /wp-admin2,221 ▲335.98 ▲0.0896.56 ▼22.8440.45 ▼3.35
Posts /wp-admin/edit.php2,104 ▲182.00 ▲0.0440.41 ▲1.7934.03 ▲1.39
Add New Post /wp-admin/post-new.php1,543 ▲123.46 ▲0.40674.17 ▼5.5960.04 ▲9.61
Media Library /wp-admin/upload.php1,403 ▲184.21 ▲0.0499.30 ▲0.9946.52 ▲3.46
Favicons /wp-admin/options-general.php?page=cwfav-options8761.8525.6024.45

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cwfav-options
    • > Notice in wp-content/plugins/wpfavicon/admin/cwfav_options.php+25
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpfavicon/display/inc/admin.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpfavicon/display/inc/login.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wpfavicon/favicon.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpfavicon/admin/cwfav_options.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpfavicon/display/inc/login.php:24

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=cwfav-options
    • > Network (severe)
    wp-content/plugins//wpfavicon/style.css - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=cwfav-options
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/options-general.php?page=cwfav-options
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (A Favicon), #2 (Admin Panel)
Please take inspiration from this readme.txt

wpfavicon/favicon.php 92% from 13 tests

Analyzing the main PHP file in "WPFavicon" version 2.1.1
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpfavicon.php" instead of "favicon.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
No dangerous file extensions were detected144 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP62932119
PO File14425

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
banner-772x250.png39.43KB12.46KB▼ 68.40%
screenshot-1.png28.70KB10.67KB▼ 62.80%
screenshot-2.png52.57KB16.43KB▼ 68.75%