84% site-icon-widget

Code Review | Site Icon Widget

WordPress plugin Site Icon Widget scored84%from 54 tests.

About plugin

  • Plugin page: site-icon-widget
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7
  • WordPress version: 6.3.1
  • First release: Sep 2, 2015
  • Latest release: Dec 10, 2016
  • Number of updates: 13
  • Update frequency: every 35.8 days
  • Top authors: celloexpressions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,375 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.70ms] Passed 4 tests

An overview of server-side resources used by Site Icon Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.91 ▼1.07
Dashboard /wp-admin3.32 ▲0.0246.98 ▼2.08
Posts /wp-admin/edit.php3.37 ▲0.0251.85 ▲3.68
Add New Post /wp-admin/post-new.php5.90 ▲0.0279.75 ▼12.14
Media Library /wp-admin/upload.php3.24 ▲0.0234.23 ▼3.52

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_site_icon
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Site Icon Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.72 ▼0.741.99 ▲0.1643.26 ▼1.21
Dashboard /wp-admin2,209 ▲245.86 ▼0.0497.33 ▼18.0139.36 ▲0.74
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0540.52 ▼5.1137.49 ▲0.18
Add New Post /wp-admin/post-new.php1,533 ▼023.28 ▲0.08647.31 ▼45.6649.66 ▼2.13
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.1496.80 ▼29.1243.39 ▼2.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_site_icon
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 1× 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/site-icon-widget/site-icon-widget.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: site icon, widget

site-icon-widget/site-icon-widget.php Passed 13 tests

This is the main PHP file of "Site Icon Widget" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
53 characters long description:
Display your site icon on your site in a widget area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected36 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1113136

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin