84% custom-social-media-widget

Code Review | Custom Social Media Widget

WordPress plugin Custom Social Media Widget scored84%from 54 tests.

About plugin

  • Plugin page: custom-social-med...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Mar 1, 2018
  • Latest release: Mar 31, 2023
  • Number of updates: 6
  • Update frequency: every 309.5 days
  • Top authors: vishitshah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,079 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼13.29ms] Passed 4 tests

Analyzing server-side resources used by Custom Social Media Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.27 ▼8.16
Dashboard /wp-admin3.33 ▼0.0143.33 ▼13.92
Posts /wp-admin/edit.php3.38 ▲0.0343.18 ▼7.93
Add New Post /wp-admin/post-new.php5.91 ▲0.0379.69 ▼23.16
Media Library /wp-admin/upload.php3.26 ▲0.0335.73 ▲4.48

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Social Media Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.24 ▼0.131.93 ▲0.2237.47 ▲0.43
Dashboard /wp-admin2,195 ▲155.61 ▼0.0489.08 ▲4.4336.78 ▼4.40
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0134.99 ▼7.4828.77 ▼11.29
Add New Post /wp-admin/post-new.php1,525 ▼123.63 ▲0.50682.51 ▲54.7752.16 ▲0.41
Media Library /wp-admin/upload.php1,403 ▼04.11 ▼0.08106.47 ▲4.7148.89 ▲6.30

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • widget_custom_social_media_widget
    • db_upgraded
    • can_compress_scripts

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)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/custom-social-media-widget/custom_social_media_widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: fb widgetsocial, icon widget, socialmedia, social media widget, twitter...

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

The main PHP file in "Custom Social Media Widget" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
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 ("custom-social-media-widget.php" instead of "custom_social_media_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin124 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1212782
CSS16042

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin