72% social-links-icons

Code Review | Social Links Icons

WordPress plugin Social Links Icons scored72%from 54 tests.

About plugin

  • Plugin page: social-links-icons
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 26, 2019
  • Latest release: Jun 26, 2019
  • Number of updates: 11
  • Update frequency: N/A
  • Top authors: dimbouteille (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /770 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▲20.31ms] Passed 4 tests

An overview of server-side resources used by Social Links Icons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1365.56 ▲23.54
Dashboard /wp-admin3.47 ▲0.1771.26 ▲22.78
Posts /wp-admin/edit.php3.52 ▲0.1764.43 ▲17.12
Add New Post /wp-admin/post-new.php6.01 ▲0.12104.62 ▲17.80
Media Library /wp-admin/upload.php3.35 ▲0.1259.52 ▲24.52
Social media management /wp-admin/options-general.php?page=social-networks3.3555.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Links Icons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲1114.16 ▼0.431.79 ▼0.1443.88 ▼7.14
Dashboard /wp-admin2,203 ▲295.58 ▲0.0096.66 ▼5.4542.72 ▲0.49
Posts /wp-admin/edit.php2,108 ▲81.97 ▼0.0534.37 ▼2.6033.34 ▼1.69
Add New Post /wp-admin/post-new.php1,533 ▲222.92 ▲0.04668.31 ▼17.7655.68 ▲4.42
Media Library /wp-admin/upload.php1,405 ▲84.18 ▼0.0699.90 ▼5.5744.83 ▼3.21
Social media management /wp-admin/options-general.php?page=social-networks5,1201.6826.6729.74

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=social-networks
    • > Deprecated in wp-content/plugins/social-links-icons/templates/texts/find-icons.php+9
    implode(): Passing glue string after array is deprecated. Swap the parameters

SRP 0% 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
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/social-links-icons/templates/tab/menu.php
    • > /wp-content/plugins/social-links-icons/templates/tab/body.php
  • 36× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SLI_Social_Abstract' not found in wp-content/plugins/social-links-icons/includes/Social/SLI_Social_Blogger.php:10
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/social-links-icons/templates/tab/body.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'SLI_Social_Abstract' not found in wp-content/plugins/social-links-icons/includes/Social/SLI_Social_Stackoverflow.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SLI_Social_Abstract' not found in wp-content/plugins/social-links-icons/includes/Social/SLI_Social_Instagram.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SLI_Social_Abstract' not found in wp-content/plugins/social-links-icons/includes/Social/SLI_Social_Vimeo.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SLI_Social_Abstract' not found in wp-content/plugins/social-links-icons/includes/Social/SLI_Social_GooglePlay.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SLI_Social_Abstract' not found in wp-content/plugins/social-links-icons/includes/Social/SLI_Social_Flickr.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SLI_Social_Abstract' not found in wp-content/plugins/social-links-icons/includes/Social/SLI_Social_Pinterest.php:10
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/social-links-icons/templates/texts/find-icons.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'SLI_Social_Abstract' not found in wp-content/plugins/social-links-icons/includes/Social/SLI_Social_Reddit.php:10

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 88% 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
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

social-links-icons/social-links-icons.php Passed 13 tests

The entry point to "Social Links Icons" version 1.1.2 is a PHP file that has certain tags in its header comment area
54 characters long description:
Simply set up links and icons to your social networks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected940 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP393731,086845
PO File1272893
CSS1051
JavaScript1051

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity2.62
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes32
▷ Abstract classes13.12%
▷ Concrete classes3196.88%
▷ Final classes00.00%
Methods44
▷ Static methods511.36%
▷ Public methods2965.91%
▷ Protected methods00.00%
▷ Private methods1534.09%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants11
▷ Global constants545.45%
▷ Class constants654.55%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin