10% 1-click-retweetsharelike

Code Review | Social Buttons by LinksAlpha

WordPress plugin Social Buttons by LinksAlpha scored 10% from 54 tests.

About plugin

  • Plugin page: 1-click-retweetsh...
  • Plugin version: 6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-4.6.1
  • WordPress version: 5.9.2
  • First release: Jun 19, 2010
  • Latest release: Sep 13, 2016
  • Number of updates: 124
  • Update frequency: every 18.4 days
  • Top authors: vivekpuri (85.48%)vmlinks (15.32%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active / 270,448 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/1-click-retweetsharelike/la-click-and-share.php+622
    Undefined index: above_content

Server metrics [RAM: ▼2.48MB] [CPU: ▼336.09ms] Passed 4 tests

An overview of server-side resources used by Social Buttons by LinksAlpha
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.89 ▼1.625.70 ▼46.07
Dashboard /wp-admin1.91 ▼1.505.06 ▼27.54
Posts /wp-admin/edit.php1.91 ▼1.736.06 ▼31.52
Add New Post /wp-admin/post-new.php1.91 ▼5.065.22 ▼1,239.21
Media Library /wp-admin/upload.php1.91 ▼1.395.20 ▼20.67
Share Buttons by LinksAlpha /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php1.915.27

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 55 new files
Database: no new tables, 60 new options
New WordPress options
lacands-html-widget-twitter-lang
lacands-html-widget-margin-left
lacands-html-widget-fb-reco-title
lacands-html-widget-fb-like-button
lacands-html-widget-fb-reco-header
lacands-html-googleplus-page-type
lacands-html-widget-fb-reco-border
lacands-html-widget-digg-button
lacands-html-widget-stumble-button
lacands-html-widget-disable-cntr-display-after
...

Browser metrics Passed 4 tests

Checking browser requirements for Social Buttons by LinksAlpha
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,844 ▲9015.87 ▲0.207.40 ▲1.562.67 ▼0.21
Dashboard /wp-admin2,909 ▲516.26 ▲0.09120.73 ▼16.04149.41 ▼11.39
Posts /wp-admin/edit.php2,712 ▲183.31 ▲0.0966.12 ▼1.08140.58 ▼1.87
Add New Post /wp-admin/post-new.php1,874 ▲11524.70 ▲3.00402.00 ▼44.32181.91 ▲24.91
Media Library /wp-admin/upload.php1,725 ▲275.84 ▲0.36149.33 ▲4.09194.44 ▲9.75
Share Buttons by LinksAlpha /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php13,7662.9871.96133.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the thickbox handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 60 options in the database
    • lacands-html-widget-twitter-button
    • lacands-html-widget-twitter-mention
    • lacands-html-widget-counters-location
    • lacands-html-widget-linkedin-counter
    • lacands-html-widget-twitter-lang
    • lacands-html-widget-buzz-lang
    • lacands-html-widget-fb-reco-header
    • lacands-html-googleplus-page-type
    • lacands-html-widget-g1-counter
    • lacands-html-widget-margin-top
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the thickbox handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the thickbox handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > User notice in wp-includes/functions.php+5768
    wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the postmessagejs handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the postmessagejs handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > User notice in wp-includes/functions.php+5768
    wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the lacandsjs handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the lacandsjs handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > User notice in wp-includes/functions.php+5768
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the lacandsnetworkpubcss handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the lacandsnetworkpubcss handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > User deprecated in wp-includes/functions.php+5316
    _c is deprecated since version 2.9.0! Use _x() instead.
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > Notice in wp-content/plugins/1-click-retweetsharelike/htmls/_la-click-and-share-buttons-networks.html+82
    Undefined index: style

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 23× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: current_opt_array in wp-content/plugins/1-click-retweetsharelike/htmls/code_snippets/sidebar.php on line 4
    • > PHP Notice
      Undefined variable: current_opt_array in wp-content/plugins/1-click-retweetsharelike/htmls/code_snippets/sidebar.php on line 2
    • > PHP Notice
      Undefined variable: current_opt_array in wp-content/plugins/1-click-retweetsharelike/htmls/code_snippets/mobile_toolbar.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/1-click-retweetsharelike/la-click-and-share-networkpub.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/1-click-retweetsharelike/htmls/code_snippets/mobile_toolbar.php:3
    • > PHP Notice
      Undefined variable: current_opt_array in wp-content/plugins/1-click-retweetsharelike/htmls/code_snippets/la_share_buttons.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/1-click-retweetsharelike/htmls/code_snippets/original_buttons.php:3
    • > PHP Notice
      Undefined variable: current_opt_array in wp-content/plugins/1-click-retweetsharelike/htmls/code_snippets/la_share_buttons.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/1-click-retweetsharelike/php/la-click-and-share-ajax-handlers.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/1-click-retweetsharelike/htmls/code_snippets/la_share_buttons.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > Javascript (severe) in unknown
    /wp-content/plugins/1-click-retweetsharelike/js/jquery.ba-postmessage.min.js?ver=5.9.2 8:97 Uncaught TypeError: Cannot read properties of undefined (reading 'opera')
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: $.receiveMessage is not a function" "TypeError: $.receiveMessage is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/1-click-retweetsharelike/js/la-click-and-share.js?ver=5.9.2:3:4)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php:53:31)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php:69:31)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: $.receiveMessage is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=1-click-retweetsharelike/la-click-and-share.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: You should set the name of your plugin on the first line ( === 1-click-retweetsharelike === )
You can look at the official readme.txt

1-click-retweetsharelike/la-click-and-share.php 92% from 13 tests

The main PHP script in "Social Buttons by LinksAlpha" version 6.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("1-click-retweetsharelike.php" instead of "la-click-and-share.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
Everything looks great! No dangerous files found in this plugin4,562 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP133224053,069
HTML1859471,224
JavaScript268180
CSS119389

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity39.00
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity12.40
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions82
▷ Named functions82100.00%
▷ Anonymous functions00.00%
Constants47
▷ Global constants47100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
20 PNG files occupy 1.45MB with 0.71MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/LinksAlpha-Mobile-Sharing-Toolbar.png10.64KB3.80KB▼ 64.31%
images/screenshot-2.png309.01KB97.59KB▼ 68.42%
images/button_style_square_large.png7.27KB3.21KB▼ 55.83%
images/button_style_square_small.png4.25KB2.11KB▼ 50.29%
images/alert.png0.47KB0.44KB▼ 7.07%