10% 2-click-socialmedia-buttons

Code Review | 2 Click Social Media Buttons

WordPress plugin 2 Click Social Media Buttons scored10%from 54 tests.

About plugin

  • Plugin page: 2-click-socialmed...
  • Plugin version: 1.6.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.0
  • WordPress version: 6.3.1
  • First release: Sep 5, 2011
  • Latest release: Jul 26, 2014
  • Number of updates: 111
  • Update frequency: every 9.5 days
  • Top authors: ppfeufer (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active /154,578 total downloads

Benchmarks

Plugin footprint 58% 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
  • Install procedure had errors
    • > Notice in wp-content/plugins/2-click-socialmedia-buttons/libs/class-twoclick-backend.php+56
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.19MB] [CPU: ▼8.84ms] Passed 4 tests

A check of server-side resources used by 2 Click Social Media Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1340.33 ▲2.64
Dashboard /wp-admin3.53 ▲0.1850.58 ▼12.71
Posts /wp-admin/edit.php3.65 ▲0.2946.79 ▼3.29
Add New Post /wp-admin/post-new.php6.11 ▲0.2284.65 ▼20.20
Media Library /wp-admin/upload.php3.46 ▲0.2236.34 ▲0.86
2-Klick-Buttons /wp-admin/options-general.php?page=twoclick_buttons3.4432.03

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
twoclick_buttons_settings
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by 2 Click Social Media Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲14613.61 ▼1.057.91 ▲5.9542.02 ▲5.18
Dashboard /wp-admin2,211 ▲204.95 ▲0.0699.34 ▼5.0279.66 ▲36.87
Posts /wp-admin/edit.php2,094 ▲52.05 ▲0.0436.65 ▼5.2432.09 ▼10.27
Add New Post /wp-admin/post-new.php1,527 ▼1323.03 ▲4.76713.19 ▲61.1857.06 ▼7.50
Media Library /wp-admin/upload.php1,393 ▲54.11 ▼0.19108.07 ▲5.3449.25 ▲4.13
2-Klick-Buttons /wp-admin/options-general.php?page=twoclick_buttons1,2081.8335.2243.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=twoclick_buttons
    • > Warning in wp-content/plugins/2-click-socialmedia-buttons/libs/class-twoclick-pages-walker.php+34
    Declaration of Twoclick_Social_Media_Buttons_Pages_Walker::start_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = NULL)
    • > GET request to /wp-admin/options-general.php?page=twoclick_buttons
    • > Warning in wp-content/plugins/2-click-socialmedia-buttons/libs/class-twoclick-pages-walker.php+39
    Declaration of Twoclick_Social_Media_Buttons_Pages_Walker::end_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::end_lvl(&$output, $depth = 0, $args = NULL)
    • > GET request to /wp-admin/options-general.php?page=twoclick_buttons
    • > Warning in wp-content/plugins/2-click-socialmedia-buttons/libs/class-twoclick-pages-walker.php+53
    Declaration of Twoclick_Social_Media_Buttons_Pages_Walker::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $data_object, $depth = 0, $args = NULL, $current_object_id = 0)

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Buttons unter dem Text.), #2 (Hinweis bei Mouseover.), #3 (Einstellungsmenü der Buttons.)
You can take inspiration from this readme.txt

2-click-socialmedia-buttons/2-click-socialmedia-buttons.php 85% from 13 tests

The main PHP script in "2 Click Social Media Buttons" version 1.6.4 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 170 characters long)

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 detected3,305 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP103911,0682,397
JavaScript4104101524
PO File1123265270
CSS42340114

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity44.50
▷ Minimum class complexity1.00
▷ Maximum class complexity171.00
Average method complexity6.19
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods67
▷ Static methods00.00%
▷ Public methods2841.79%
▷ Protected methods00.00%
▷ Private methods3958.21%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/settings.png0.64KB0.68KB0.00%
images/sprite-de_DE.png6.31KB4.74KB▼ 24.88%
images/sprite.png5.79KB4.44KB▼ 23.42%
images/socialshareprivacy_info.png0.16KB0.11KB▼ 31.33%
images/socialshareprivacy_on_off.png1.27KB1.29KB0.00%