ClassicPress PetitionsClassicPress Petitions
This is a read-only archive. Post or comment on the live version of this page on our forums.

A secondary repository for open source Scripts

December 21, 2018 · 15:33 · Damian Baker
Description

Yes, we have the Plugin repository, but we don't always need to use a plugin for menial tasks. What would be great is tapping into a script repository for simple installations of scripts to be used. WordPress already comes bundled with plenty, although I am talking more about those cool scripts you find on sites like CodePen, JSFiddle, and Codrops.
Imagine a plugin and script repository working side by side.

Voters
+5 more
Discussion
Raymund

Some plugin tasks can be accomplished by simple scripts. I would favor using simple open source scripts, just copy and pasting, than installing a lot of plugins.

Damian Baker

Hi Raymund,

Thanks for your feedback on this petition. I agree that open-source scripts should be kept as that and not pluginified. It also gives script authors a chance to promote their scripts, maybe even earn some income for their premium editions.

I am all for it. :)

Kind Regards,
Damian Baker

Wade Striebel

I like this idea and agree with Damian!

Tim Kaye

Do you mean a repository or a directory? I ask because, although I use a ton of open source scripts and never use a plugin (if there is one) that claims to WP-ify them, I find that almost all the ones I use need significant modification. Sometimes this is because they are old; sometimes it's because they have a bug; sometimes it's because they don't cater for accessibility requirements.

I'd be reluctant to see CP maintaining a repository of scripts, because a repo (to me, at least) implies some degree of vetting, and such scripts should never be allowed in. A directory, on the other hand, simply provides an easy means of locating scripts that might be useful. I could get behind that -- but that isn't a repo.

hyperclock

This is a great idea. @Tim Kaye, I hope I'm not rude in saying I don't agree with your definition of repository, althogh I understand what you mean. According to WikiPedia (https://www.webopedia.com/TERM/R/repository.html)...Generically refers to a central place where data is stored and maintained. A repository can be a place where multiple databases or files are located for distribution over a network, or a repository can be a location that is directly accessible to the user without having to travel across a network.

So "repository" would/should be the correct name, but with your form of configuring that repo.

Tim Kaye

@hyperclock: Not rude at all!

Raymund

Either repository or directory would do. The concept I think would be like creating a subdirectory within ClassicPress Research Github where open source scripts could be published that can be used for CP, like script to send email using SMTP to use an external email server rather using own server, change email from email and from name, limit access to admin/dashboard for particular roles, create a custom post type, example use cases for $wpdb. I know there are a lot of it found in the web. But a directory within CP, that I would definitely use and hopefully help improve as well.

James Nylen

Why wouldn't these just be written as small, focused plugins?

Edit: also, if you're modifying the site's code, this should be done by modifying the site's code. The existing plugin and theme editors are the bane of developers everywhere, and I wish we could delete them rather than expanding them even further.

Raymund

I was using a lot of plugins before. Then, I converted most of them to scripts on my own mu-plugin to have same funtionalities but not using a lot of plugins, mostly so I am aware of the exact scripts running, and avoid vulnerabilities from third party plugins. Also, make the app more lightweight.

James Nylen

> Then, I converted most of them to scripts on my own mu-plugin

Yes, this is also a good approach. I don't understand what a script repository would gain over having small plugins or incorporating the code you want into a mu-plugin.

If you're just looking for the code snippets themselves, then it's pretty hard to beat https://wordpress.stackexchange.com/. It's got code, discussion, and reviews of each potential answer.

Wells

Is the idea here is create a categorized, moderately-vetted list of snippets where people could go to copy code that they would otherwise have to find elsewhere? If so, I can see some value in that versus searching stackexchange/gist/etc. But if it's not categorized, attributed, and at least somewhat vetted, I don't see the point.

Also, +1 for deleting the plugin and theme editors.

James Nylen
Raymund

When using CP for informational or brochure type sites, no problems using plugins. But when creating web applications that gathers names, addresses or other user info, code snippets would be better, especially low-code. This is so the developer implementing can do code review and make his own changes without having to browse the entire lines of the plugin. Just a simple functionality per code snippet.

Alan Coggins

I have done something along these lines with Classic Commerce snippets here, https://classiccommerce.cc/docs/snippets/ ; I decided to use gist for storing the code.

I would class this as a "categorized, moderately-vetted list" since I have tested them all with Classic Commerce. I do think that having them presented in some form of list or index makes them much more accessible.