72% spoontalk-social-media-icons-widget

Code Review | Social Media Icons Widget

WordPress plugin Social Media Icons Widget scored 72% from 54 tests.

About plugin

  • Plugin page: spoontalk-social-...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.3
  • WordPress version: 5.8.1
  • First release: Feb 18, 2015
  • Latest release: Jan 10, 2020
  • Number of updates: 20
  • Update frequency: every 89.4 days
  • Top authors: a.ankit (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

4,000+ active / 37,707 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
Install script ran successfully

Server metrics [RAM: ▼0.03MB] [CPU: ▼148.92ms] Passed 4 tests

Analyzing server-side resources used by Social Media Icons Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.67 ▼0.1717.08 ▼10.63
Dashboard /wp-admin3.08 ▲0.0232.77 ▼7.50
Posts /wp-admin/edit.php3.13 ▲0.0232.22 ▼1.29
Add New Post /wp-admin/post-new.php5.44 ▲0.0078.40 ▼576.25
Media Library /wp-admin/upload.php3.02 ▲0.0225.07 ▲1.37
TheWPHosting Social Icons /wp-admin/options-general.php?page=spoontalk_social_media3.1627.18

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 2 new options
New WordPress options
spoontalk_social_style_settings
widget_spoontalk-sociamedia-icons-widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Media Icons Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲7715.95 ▼0.067.40 ▲0.4877.59 ▲3.53
Dashboard /wp-admin2,938 ▲426.06 ▼0.24115.14 ▼16.29168.78 ▼7.31
Posts /wp-admin/edit.php2,742 ▲363.24 ▼0.0162.64 ▼0.19137.78 ▼2.42
Add New Post /wp-admin/post-new.php3,816 ▼1819.22 ▲0.11414.32 ▼40.17155.17 ▼12.28
Media Library /wp-admin/upload.php1,757 ▲85.52 ▼0.02134.24 ▼7.41182.52 ▼3.65
TheWPHosting Social Icons /wp-admin/options-general.php?page=spoontalk_social_media2,7363.3173.63164.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 2 options in the database
    • widget_spoontalk-sociamedia-icons-widget
    • spoontalk_social_style_settings

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=spoontalk_social_media
    • > Notice in wp-content/plugins/spoontalk-social-media-icons-widget/settings.php+441
    Undefined variable: spoontalk_hover_animation

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/spoontalk-social-media-icons-widget/css/style.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: icon_style in wp-content/plugins/spoontalk-social-media-icons-widget/css/style.php on line 4
    • > PHP Notice
      Undefined variable: icon_style in wp-content/plugins/spoontalk-social-media-icons-widget/css/style.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spoontalk-social-media-icons-widget/spoontalk_social_scripts.php:102
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/spoontalk-social-media-icons-widget/spoontalk_social_icon_widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spoontalk-social-media-icons-widget/spoontalk_social_icons_admin.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/spoontalk-social-media-icons-widget/settings.php:52
    • > PHP Notice
      Undefined variable: icon_style in wp-content/plugins/spoontalk-social-media-icons-widget/css/style.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Settings Screen) image required
The official readme.txt is a good inspiration

spoontalk-social-media-icons-widget/spoontalk_social_icons_admin.php 92% from 13 tests

The principal PHP file in "Social Media Icons Widget" v. 1.6 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("spoontalk-social-media-icons-widget.php" instead of "spoontalk_social_icons_admin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected9,252 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS44302957,991
PHP520735673
SVG100504
JavaScript214084

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity13.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%
Functions10
▷ Named functions10100.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
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/reorder-feature-post.png33.94KB15.16KB▼ 55.35%
screenshot-1.png40.67KB19.61KB▼ 51.78%