10% social-media-in-the-sidebar

Code Review | Social media in the sidebar

WordPress plugin Social media in the sidebar scored10%from 54 tests.

About plugin

  • Plugin page: social-media-in-t...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2013
  • Latest release: Mar 27, 2013
  • Number of updates: 28
  • Update frequency: every 0.9 days
  • Top authors: fasalu@sweans.com (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /5,338 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/social-media-in-the-sidebar/social_media_widget.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; fr_Social_media has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼44.02ms] Passed 4 tests

This is a short check of server-side resources used by Social media in the sidebar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.27 ▼29.82
Dashboard /wp-admin2.29 ▼1.0110.63 ▼36.62
Posts /wp-admin/edit.php2.29 ▼1.0610.34 ▼35.19
Add New Post /wp-admin/post-new.php2.29 ▼3.5911.13 ▼74.44
Media Library /wp-admin/upload.php2.29 ▼0.949.64 ▼23.06

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_fr_social_media

Browser metrics Passed 4 tests

A check of browser resources used by Social media in the sidebar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.32 ▼1.051.73 ▲0.0741.23 ▼6.01
Dashboard /wp-admin2,206 ▲154.88 ▲0.01107.57 ▼8.4542.10 ▼1.44
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0040.74 ▲2.1034.36 ▼4.77
Add New Post /wp-admin/post-new.php1,536 ▼623.28 ▲5.19659.28 ▲28.7952.08 ▼6.22
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0898.15 ▼4.7041.23 ▼1.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
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 fr_Social_media is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_fr_social_media
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-media-in-the-sidebar/social_media_widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: widget, icons, social media

social-media-in-the-sidebar/social_media_widget.php 92% from 13 tests

The principal PHP file in "Social media in the sidebar" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("social-media-in-the-sidebar.php" instead of "social_media_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
Success! There were no dangerous files found in this plugin192 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1438192

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.07
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin