72% social-media-widget

Code Review | Social Media Widget

WordPress plugin Social Media Widget scored72%from 54 tests.

About plugin

Code review

54 tests

User reviews

84 reviews

Install metrics

50,000+ active /2,053,692 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼9.06ms] Passed 4 tests

Server-side resources used by Social Media Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2044.10 ▲3.14
Dashboard /wp-admin3.51 ▲0.1649.36 ▼13.64
Posts /wp-admin/edit.php3.62 ▲0.2649.41 ▼1.09
Add New Post /wp-admin/post-new.php6.09 ▲0.2085.81 ▼24.55
Media Library /wp-admin/upload.php3.43 ▲0.2040.11 ▲3.04
AppSumo /wp-admin/admin.php?page=smw_go_appsumo_pro3.2325.36
Other Tools /wp-admin/admin.php?page=social-media-widget-plugin-other-tools3.4038.81
Social Media Widget /wp-admin/admin.php?page=social-media-widget3.4031.51

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

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

Browser metrics Passed 4 tests

Social Media Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4314.42 ▲0.141.66 ▼0.6633.23 ▼5.63
Dashboard /wp-admin2,233 ▲565.50 ▼0.1784.22 ▼11.4843.76 ▲1.56
Posts /wp-admin/edit.php2,135 ▲352.03 ▲0.0937.47 ▼2.1634.56 ▼3.85
Add New Post /wp-admin/post-new.php1,557 ▲3123.01 ▲0.01689.12 ▼20.7259.15 ▲7.10
Media Library /wp-admin/upload.php1,438 ▲414.15 ▼0.09105.40 ▼13.5049.67 ▼1.03
AppSumo /wp-admin/admin.php?page=smw_go_appsumo_pro2,26415.14667.42169.69
Other Tools /wp-admin/admin.php?page=social-media-widget-plugin-other-tools1,0162.0425.8149.84
Social Media Widget /wp-admin/admin.php?page=social-media-widget8982.0423.4333.72

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
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_social-widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/social-media-widget/appsumo-capture-form.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/social-media-widget/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/social-media-widget/social-widget.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/social-media-widget/other_tools.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=smw_go_appsumo_pro
    • > Network (severe)
    https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=social-media-widget - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=smw_go_appsumo_pro
    • > Javascript (severe) in unknown
    https://appsumo2-cdn.appsumo.com/static/dist/js/vue_bridge.61ea1a9c.js 6:75186 Uncaught TypeError: (void 0) is not a function
    • > GET request to /wp-admin/admin.php?page=smw_go_appsumo_pro
    • > Console-api (warning) in unknown
    https://accounts.google.com/gsi/client 41:457 "[GSI_LOGGER]: Relative login_uri was provided. Use absolute url instead. Relative login_uri may be considered invalid in the future."

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Web 2.0 icon pack), #2 (Cutout icon pack), #3 (Heart icon pack), #4 (Sketch icon pack), #5 (Widget control panel with all sections collapsed), #6 (Widget control panel with General Settings expanded), #7 (Widget control panel with Social Networking service section expanded)
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

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

The entry point to "Social Media Widget" version 4.0.6 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("social-media-widget.php" instead of "social-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,451 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP4155171941
CSS3473399
SVG302104
JavaScript1007

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity143.00
▷ Minimum class complexity143.00
▷ Maximum class complexity143.00
Average method complexity18.75
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
681 compressed PNG files occupy 1.57MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/heart/32/digitaltunes.png1.76KB1.73KB▼ 1.22%
images/sketch/16/hyves.png1.02KB1.08KB0.00%
images/sketch/64/slashdot.png3.19KB3.20KB0.00%
images/default/16/cuttings.png0.72KB0.83KB0.00%
images/heart/16/reddit.png1.02KB1.01KB▼ 1.43%