Stop using code snippet plugins

preview_player
Показать описание
Stop using WordPress code snippet plugins in production. Move them to a child theme or make a custom plugin for them instead.

I was surprised to learn that people commonly use code snippet plugins in production despite the security and performance issues. This video discusses the problems and presents two alternatives.

🧰 Child Theme Resources:

🧰 Custom plugin Resources:

🌐 My Websites:

✅ Connect with Me:

⚙️Tools I Use:

⌚ Timestamps:
00:00 Introduction
01:04 About snippet plugins
04:04 Performance issues
05:18 Security concerns
07:18 Child themes
14:11: Custom plugin
20:18 Outro
Рекомендации по теме
Комментарии
Автор

I agree. I've been doing it for a long time, I store short codes in a unique plugin for each site. Storing in a child theme is not very correct - firstly, the theme is for design, and secondly, plugins are executed earlier.

vovkasolovev
Автор

Besides that this video is great, I love that you are not reading your words from the paper, but you are rather talking spontaneously. You have a great personality Adam, and this kind of video (not scripted) seems way more natural and I just like to watch it even more. Maybe you can continue to record videos without scripts :)

uioverhaul
Автор

Awesome Video - I had no idea that snippets plugins created these issues - Thanks Adam!

suffolkwebdesign
Автор

Thanks for sharing your wisdom. This is the way. Subbed. This video is most timely, as I've recently arrived at this same conclusion myself, and am thankful to find someone of your calibre validating my assumptions.

JamesJosephFinn
Автор

One thing about child themes is that I learned about the use of the Create Block Theme plugin with WordPress default themes as well. Very handy. You can choose to create a new theme or child theme.

MikeSimpson
Автор

very good points, just check this plugin, it's new and file based and can delete the plugin without effecting the snippets, it's called fluent snippets.
"Your snippets are safely saved in your file system and load natively with zero database queries, so it’s safe, secure, and ultra-fast."

AhmedSiddieg
Автор

I had been thinking about this earlier. These plugins for custom code snippets and CSS frameworks seemed to be repetitive if you're able to put this code into your child theme. I've seen things like Core Framework and Automatic.css creating a plugin with a UI to define custom CSS properties (variables) and utility classes that you can then apply on elements for consistent styling. This includes things like fonts, font size, colors, spacing and layout, etc. Given this example, is this another thing you can easily do by just defining all this CSS within the WordPress child theme's `style.css` file and then referencing those classes on various elements, possibly within a page builder like Bricks? Thanks for any help & insights.

jacobwwarner
Автор

I found this video just when I needed some advice, thank you.

ZeoinBuffer
Автор

Really, really interesting stuff here. Well that's about the extent of my "technical speak". Many thanks for the info and something I will certainly attempt to implement too.

andrewdowniephd
Автор

Brilliant!!! Thank you so much for sharing this

HappilyHafsa
Автор

Thanks for the video! Regarding the "own Plugin" part - where did you start with that. from the overview i see a lot of interesting stuff which make me think to do my own one. BUT i have no clue of php :) Did you come up with the general idea on your own and it eveolved with your own and community snipets? And pointing into the right direction? THANKS

mikt
Автор

Although it requires extra steps to read the database, using a snippet instead of a plugin might increase performance. The reason for this is that many plugins include a lot of unused JavaScript and CSS that hinder performance even more than adding an extra snippet would. And, I don't see how a plugin's updates would have less of a security issue than a snippet plugin.

zvit
Автор

Amazing video!!! I was not aware of these issues. I am curious about your opinion on the new fluent snippets plug in that seems to attempt to resolve those issues but I am not sure if it does?

jhonnatanr
Автор

What is the difference when you create your own plugin and use code snippets plugin? Both are plugins? Both will query the database?

dzulhelmi
Автор

I'm returning to this video for a second look. Your demo at the end of the custom plugin really stuck in my memory. I would like to implement this workflow in a project I'm working on; and it'd be really helpful to examine the file structure of your setup in detail to help educate myself. This wouldn't happen to be on Github / Gitlab anywhere would it? Thank you sir.

JamesJosephFinn
Автор

Fluent snippets which launched recently doesn't store in the database, would that resolve many of the performance and security issues you identified?

IEVolleyBallNerd
Автор

Hi Adam, I've seen some brilliant videos from you. Thank you.

I get your points, but feel the blanket "stop using" title is a tad unfair to developers and users who have balanced considerations, have a need for a different workflow and use them to improve performance and security.

I love WP Codebox. Admittedly, these days I use it for mostly HTML and CSS coding for static sites, but it is now the last remaining WP plugin I trust.

Very early on the author paid a lot to have an independent company look for security issues with his work (even though he has worked on well known unproblematic plugins for some years) How many bother to do that?

I think your content here has great value for many (even though it does not cover why you might still want to use one), but I wish you would change the title to something less damaging to a generous and conscientious plugin author.

DavidWaumsley
Автор

This is a non coder question..as I might not be part of your target audience.. but its something we all should be aware of .
My question is regarding the custom plugin..how is that more secure than wpcodebox? A
Is it because its not a public plugin?

jerryb
Автор

Now this is insane to me! I'm already rambling inside my brain WTF!
I rely on WP Code Box plugin to do my styling more than ever! especially using partials, I also manage many projects efficiently, and a lot to mention!
What do you think about this? Advice?

kareem
Автор

Hi, Adam! Is your plugin available for download? Those default settings would save me soo much time. I'm also a member of the Circle, by the way.

mihaiandrei