YahnisElsts / plugin-update-checker

A custom update checker for WordPress plugins. Useful if you don't want to host your project in the official WP repository, but would still like it to support automatic updates. Despite the name, it also works with themes.
MIT License
2.27k stars 411 forks source link

Lite version of the project #553

Open mehdi-najaran opened 10 months ago

mehdi-najaran commented 10 months ago

Hello, is it possible for you to provide me with a light and compact version of the project?

A version without the ability to connect to GitHub Version without comments Special version for updating the plugin (without theme)

In this way, less code and volume is occupied in the project

YahnisElsts commented 10 months ago

No, probably not.

It doesn't seem useful enough to be worth the effort. This isn't a JS library that has to be downloaded by every visitor. It just sits on the server. I think going to great lengths to reduce the size wouldn't yield much of a benefit.

mehdi-najaran commented 10 months ago

Now I put the project file in my plugin core

This issue has increased its volume, am I wrong?

YahnisElsts commented 10 months ago

You are not wrong. By adding PUC to your plugin, the size of your plugin download has increased by about 150 KB (zipped).

But what is the meaningful impact of that? Your users will have to spend a fraction of a second longer downloading your plugin, and it will take up about 360 KB more space on their server. Will they even notice? How much does that matter, and how much time are you willing to spend to optimize it? Personally, it doesn't look very significant to me.

(I'm aware that this sounds suspiciously similar to the kind of reasoning that some careless people might use to justify e.g. websites adding megabytes of JS to every page, but I think scale does matter here. Installing a plugin is generally a one-time kind of thing, or close to that.)

mehdi-najaran commented 10 months ago

Yes you are right . But keep this issue that I have raised as an idea and suggestion in the corner of your mind, and implement it whenever you can.

Because, for example, my plugin is 80 kilobytes in size and is highly optimized. If a 150 KB project is added to it, it will really stand out

YahnisElsts commented 10 months ago

All right.

DavidAnderson684 commented 10 months ago

Removing parts of a project can be unexpectedly dangerous: if multiple plugins are using this library, and the one that gets loaded is a version with some classes removed, then that may cause the plugins that expected the full version to be present to have a problem.

YahnisElsts commented 10 months ago

That is also a good point, and one that didn't occur to me. Though to be fair, it would be possible to redesign the library to still work correctly in that situation - it would just take even more work.

theo-gk commented 6 months ago

@mehdi-najaran You can safely remove the translation files from the /languages/ directory in case you don't need them. It will save you more than 80KB. But it will have no effect in performance, just in file size. Probably isn't worth it, though.