83% social-icon-widget

Code Review | Social Icon Widget

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

About plugin

  • Plugin page: social-icon-widget
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: May 18, 2016
  • Latest release: Dec 2, 2017
  • Number of updates: 18
  • Update frequency: every 31.3 days
  • Top authors: itzmostafiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active / 12,603 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.76ms] Passed 4 tests

Analyzing server-side resources used by Social Icon Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.07 ▼6.74
Dashboard /wp-admin3.32 ▲0.0146.17 ▼2.03
Posts /wp-admin/edit.php3.37 ▲0.0147.87 ▲3.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.60 ▼13.77
Media Library /wp-admin/upload.php3.24 ▲0.0135.77 ▲3.50

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_social_icon_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Social Icon Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.24 ▼1.154.43 ▲2.6443.46 ▼4.07
Dashboard /wp-admin2,206 ▲185.82 ▲0.92101.89 ▲0.5135.18 ▼9.76
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0239.49 ▼1.3233.75 ▼1.01
Add New Post /wp-admin/post-new.php1,514 ▼1017.41 ▼4.20671.43 ▼34.1548.84 ▼6.37
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0196.94 ▼2.5446.13 ▼3.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_social_icon_widget
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

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
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-icon-widget/social-icon-func.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Social Icons with hover effect.) image missing
  • Tags: Too many tags (25 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

social-icon-widget/social-icon.php 85% from 13 tests

The entry point to "Social Icon Widget" version 1.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("social-icon-widget.php" instead of "social-icon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin3,061 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP210327288
CSS214102

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity81.00
▷ Minimum class complexity81.00
▷ Maximum class complexity81.00
Average method complexity27.67
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png34.34KB7.04KB▼ 79.49%