Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAdam Silva
1,579 PointsMy Social Share WordPress plugin
Hey guys, I've completed the WordPress plugin development course and I've developed a plugin. My plugin adds social share buttons on posts. It doensn't need JavaScript or images, it uses only SVG. It's good for SEO purposes. Take a look and go ahead to review it: https://wordpress.org/plugins/ultra-light-social-share-buttons/
2 Answers
Sue Dough
35,800 PointsCode looks pretty clean. I like your approach. Using JS is very slow and ruins user privacy.
Line 29 ultra-light-social-share-buttons.php
sufficiente should be sufficient in English
Line 22 ultra-light-social-share-buttons.php
'ultralight_options_page'
would be
'ultralight_options_page',
if you follow the WordPress standards. it is recommended last items of an array have commas which also makes it easy to add on in the future
Also all the arrays with => should be at the same point on arrays if following the WordPress coding standards
Source for both comments can be found: https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#indentation
Also some ad blockers will block classes based on name. So consider switching your class names so they pass all ad blockers. For example resp-sharing-button resp-sharing-button--facebook could be resp-sharing-button resp-sharing-button--fb. This will trick most ad blockers.
Adam Silva
1,579 PointsThanks for your feedback Sue. I agree. I will make those changes. That was a good piece of advice about the ad block.
Best regards, Adam