83% simple-social-icon-widget

Code Review | Simple Social Icon Widget

WordPress plugin Simple Social Icon Widget scored 83% from 54 tests.

About plugin

  • Plugin page: simple-social-ico...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 5.8.1
  • First release: Jan 12, 2016
  • Latest release: Jan 12, 2016
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: shafiqul (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 8,957 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼140.80ms] Passed 4 tests

Server-side resources used by Simple Social Icon Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1839.91 ▲18.76
Dashboard /wp-admin3.12 ▲0.0644.41 ▼1.36
Posts /wp-admin/edit.php3.17 ▲0.0641.10 ▼3.00
Add New Post /wp-admin/post-new.php5.48 ▲0.0594.36 ▼554.44
Media Library /wp-admin/upload.php3.06 ▲0.0535.76 ▼4.39

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 1 new option
New WordPress options
widget_gcz_simple_social_widget_id

Browser metrics Passed 4 tests

Simple Social Icon Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,707 ▲12515.95 ▲0.3612.31 ▲2.8144.92 ▼3.10
Dashboard /wp-admin2,970 ▲365.85 ▼0.12149.35 ▲4.87101.90 ▼4.17
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0063.23 ▼4.5290.13 ▼0.40
Add New Post /wp-admin/post-new.php3,691 ▲2,00815.13 ▼3.44480.96 ▲25.95113.97 ▲5.30
Media Library /wp-admin/upload.php1,807 ▼05.03 ▼0.01156.40 ▲6.85111.20 ▼14.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_gcz_simple_social_widget_id

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-social-icon-widget/inc/Class-social-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-social-icon-widget/social-widget.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: These screenshots require images: #1 (Simple Social Icon 3 Design Pack), #2 (Widget Option)
The official readme.txt might help

simple-social-icon-widget/social-widget.php 92% from 13 tests

Analyzing the main PHP file in "Simple Social Icon Widget" version 1.0
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-social-icon-widget.php" instead of "social-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected447 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2198265
CSS21220137
SVG10045

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity9.25
▷ Minimum method complexity1.00
▷ Maximum method complexity21.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

All PNG images should be compressed to minimize bandwidth usage for end users
16 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/icon/style_3/tumblr.png2.30KB1.80KB▼ 21.50%
inc/icon/style_3/facebook.png2.21KB1.80KB▼ 18.37%
screenshot-2.png39.42KB16.48KB▼ 58.20%
inc/icon/style_3/flickr.png2.26KB1.81KB▼ 19.86%
inc/icon/style_3/rdio.png2.09KB1.46KB▼ 29.81%