83% easy-set-favicon

Code Review | Easy Set Favicon

WordPress plugin Easy Set Favicon scored83%from 54 tests.

About plugin

  • Plugin page: easy-set-favicon
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: May 21, 2012
  • Latest release: May 31, 2013
  • Number of updates: 16
  • Update frequency: every 23.5 days
  • Top authors: eftakhairul (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

3,000+ active /21,674 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.01MB] [CPU: ▼1.68ms] Passed 4 tests

Server-side resources used by Easy Set Favicon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.06 ▲2.40
Dashboard /wp-admin3.31 ▲0.0149.34 ▼4.56
Posts /wp-admin/edit.php3.36 ▲0.0152.05 ▲4.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.12 ▼5.38
Media Library /wp-admin/upload.php3.23 ▲0.0136.90 ▲0.84

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: 1 new table, 6 new options
New tables
wp_fav_icon_link
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Easy Set Favicon: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.37 ▼0.021.84 ▼0.4144.61 ▼3.58
Dashboard /wp-admin2,215 ▲415.58 ▼0.0293.49 ▼7.6272.23 ▲29.17
Posts /wp-admin/edit.php2,126 ▲262.04 ▲0.0340.02 ▲0.0634.94 ▼0.35
Add New Post /wp-admin/post-new.php1,555 ▲1023.22 ▼0.09660.06 ▲47.7761.09 ▼7.97
Media Library /wp-admin/upload.php1,419 ▲254.21 ▼0.03104.04 ▲1.9877.33 ▲32.49

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/easy-set-favicon/save-icon-url.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/easy-set-favicon/set-fav-icon.php:15
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/easy-set-favicon/save-icon-url.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === easy-set-favicon === )
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

easy-set-favicon/set-fav-icon.php 92% from 13 tests

"Easy Set Favicon" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-set-favicon.php" instead of "set-fav-icon.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
No dangerous file extensions were detected87 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3291380
Markdown1807

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png8.61KB3.42KB▼ 60.24%
assets/screenshot-1.png10.12KB3.91KB▼ 61.35%