84% social-simple-widget

Code Review | Social Simple Widget

WordPress plugin Social Simple Widget scored84%from 54 tests.

About plugin

  • Plugin page: social-simple-widget
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.7.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2015
  • Latest release: May 11, 2021
  • Number of updates: 52
  • Update frequency: every 39.8 days
  • Top authors: mrinal013 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,752 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.34ms] Passed 4 tests

Server-side resources used by Social Simple Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.12 ▲1.91
Dashboard /wp-admin3.37 ▲0.0247.06 ▼14.50
Posts /wp-admin/edit.php3.42 ▲0.0652.65 ▲6.56
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.82 ▼1.96
Media Library /wp-admin/upload.php3.29 ▲0.0634.42 ▲1.18

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_social_simple_widget
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Social Simple Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.23 ▼1.151.67 ▼0.0644.50 ▲5.34
Dashboard /wp-admin2,211 ▲324.84 ▼1.04106.28 ▲3.3642.75 ▼0.83
Posts /wp-admin/edit.php2,091 ▲22.04 ▼0.0238.06 ▲1.3334.97 ▼1.16
Add New Post /wp-admin/post-new.php1,539 ▲618.37 ▼4.82607.02 ▼47.4174.58 ▲19.94
Media Library /wp-admin/upload.php1,390 ▲24.20 ▼0.0695.25 ▼13.4840.73 ▼7.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_social_simple_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/social-simple-widget/social_simple_widget.php

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

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Too many tags (29 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

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

The entry point to "Social Simple Widget" version 2.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("social-simple-widget.php" instead of "social_simple_widget.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
There were no executable files found in this plugin1,558 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
SVG100685
JavaScript238478
PHP17127222
CSS323173

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity9.71
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
22 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/custom_submit.png0.97KB0.99KB0.00%
images/colorpicker_hsb_h.png0.99KB0.77KB▼ 21.94%
images/custom_hsb_h.png0.95KB0.73KB▼ 23.40%
images/colorpicker_rgb_r.png1.04KB0.77KB▼ 26.17%
images/colorpicker_overlay.png10.11KB8.24KB▼ 18.50%