michaeluno / admin-page-framework

Facilitates WordPress plugin and theme development.
http://admin-page-framework.michaeluno.jp/
Other
339 stars 71 forks source link

The wordpress.org plugin review team says the minified version is obfuscated #181

Closed michaeluno closed 9 years ago

michaeluno commented 9 years ago

Hi all,

I just got an email today (January 1st, 2015) from wordpress.org, saying that they consider the minified version of the framework as obfuscated code.

On a recent review of plugins in the repository, we determined your plugin was violating our guidelines.

https://wordpress.org/plugins/admin-page-framework

The following file has been compressed beyond readibility:

http://plugins.svn.wordpress.org/admin-page-framework/trunk/library/admin-page-framework.min.php

Using encryption methods to hide your code or otherwise make it human-unreadable is in violation of the repository guidelines, found at: http://wordpress.org/extend/plugins/about/guidelines/

In specific, the fourth guideline, which reads: "4. No obfuscated code."

It's fine to compress your code and minify, but it's not okay to hide it. All code must be human readable for inclusion in this repository.

Please fix this as soon as possible.

I can hardly agree with what they say but it is not a good idea to argue with them when they are the one hosting the files.

So what's the best way to handle this problem?

ghost commented 9 years ago

Oh damn, sorry to hear this Michael. Is it possible to submit an un-minified version, then have a compiler built in that will minify everything once the developer starts building?

michaeluno commented 9 years ago

The un-minified version is already included.

have a compiler built in that will minify everything once the developer starts building?

I don't quite follow what you mean here.

It is possible to create a download page (for example, Dashboard -> Admin Page Framework -> Tools) that lets the developer download their own version of the minified version. Is it different from what you are talking about?

ghost commented 9 years ago

That sounds different from what I meant, but absolutely feasible for this to be done as you have described. The download presents a minified version to include in the files. Is this what you meant?

michaeluno commented 9 years ago

The download presents a minified version to include in the files. Is this what you meant?

That's right. Each developer was supposed to copy the minified version of the framework in the library directory. Since the WordPress plugin review team does not seem to like the minified version, I've already removed it in v3.4.5.1 (which I just released. an hour ago) So currently there is no means for the developer to get the minified version in the distribution package. (I placed a link to get the file though.)

There should be an easier means to get the minified version however. So I thought of creating a download link in an admin page that lets the user download the minified version. Technically, it is just a matter of running a minifier script.

Though, If you have a different idea, let me hear it.

michaeluno commented 9 years ago

It seems a Code beautifier script can be used to make it human readable. It increases the size about 50kb or so in my tests but it should be a fair sacrifice.in return for the framework not being removed from the wordpress.org directory listing.

ghost commented 9 years ago

A good compromise on that mate. 50kb is nothing to flinch at.