10% social-media-icons

Code Review | Social Media Icons Widget

WordPress plugin Social Media Icons Widget scored10%from 54 tests.

About plugin

  • Plugin page: social-media-icons
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 11, 2012
  • Latest release: Mar 17, 2013
  • Number of updates: 28
  • Update frequency: every 12.2 days
  • Top authors: arstropica (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active /103,722 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/social-media-icons/smc_widget.php+75
    Methods with the same name as their class will not be constructors in a future version of PHP; SMCWidget has a deprecated constructor

Server metrics [RAM: ▼1.70MB] [CPU: ▼54.36ms] Passed 4 tests

An overview of server-side resources used by Social Media Icons Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.1810.41 ▼35.19
Dashboard /wp-admin2.30 ▼1.0011.52 ▼45.21
Posts /wp-admin/edit.php2.30 ▼1.0511.29 ▼43.06
Add New Post /wp-admin/post-new.php2.30 ▼3.5813.16 ▼93.96
Media Library /wp-admin/upload.php2.30 ▼0.9312.21 ▼26.59

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 267 new files
Database: no new tables, 9 new options
New WordPress options
widget_smcwidget
first_save
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
default_iconset
widget_recent-posts

Browser metrics Passed 4 tests

Social Media Icons Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.23 ▼0.352.34 ▲0.5443.65 ▼0.07
Dashboard /wp-admin2,195 ▲245.64 ▼0.0285.54 ▼7.7242.17 ▲2.75
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0139.70 ▲0.3734.71 ▲0.25
Add New Post /wp-admin/post-new.php1,547 ▲1623.15 ▼0.13674.98 ▼11.8257.85 ▼4.52
Media Library /wp-admin/upload.php1,400 ▼34.19 ▲0.0497.00 ▼21.0739.65 ▼8.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SMCWidget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_smcwidget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/social-media-icons/smc_widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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 (Widget Front End), #2 (Widget Back End)
  • Donate link: Invalid url: ""
  • Tags: You are using too many tags: 18 tag instead of maximum 10
You can take inspiration from this readme.txt

social-media-icons/smc_widget.php 92% from 13 tests

The main PHP script in "Social Media Icons Widget" version 1.2.7 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("social-media-icons.php" instead of "smc_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected661 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS2013273
JavaScript35357230
PO File44381158
PHP1394420

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity70.00
▷ Minimum class complexity70.00
▷ Maximum class complexity70.00
Average method complexity5.60
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
254 PNG files occupy 1.40MB with 0.79MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/iconset/3D Vector/buzz.png4.82KB1.61KB▼ 66.65%
images/iconset/Puzzle Piece/contact.png5.15KB1.68KB▼ 67.39%
images/iconset/Sleek Green/linkedin.png3.41KB1.25KB▼ 63.25%
images/add.png1.86KB1.57KB▼ 15.70%
images/iconset/Breakthrough/youtube.png5.27KB1.69KB▼ 67.98%