HELP! Can any one explain me?

css

#1

Hey all, i just recieved a feed back about my submited plugin
this is what the reviewer said

You’re nearly there!

  1. Please name all files uniquely.

  2. Please make sure all code is properly commented and indented.

  3. $(function is essentially the same as $(document).ready

  4. Please avoid generic CSS names/rules like body, *, .color, .container, etc in your plugin CSS file

  5. Please provide adequate documentation is either PDF or HTML format.

So what made me confused is 1 and 4
1 * basic files are index html , ( css , js and images folders)
i dont what did they mean with name all files uniquely
4 * What the generic CSS is talking about? if i have not to do body .container … what im gonna do
PLEASE HELP
Thank you, Kamal


#2

If you even submit your plugin on wordpress.org repository, they will also ask you to do these same things so your plugin will not conflict with other plugins or theme files.

About the first thing they asked you is that You should name your php files and it’s functions / classes in unique way. let say i have a create a plugin which have some customised code for posts so i just make a files named : show_posts.php and name the functions inside it something like: function show_posts(){ } , this is pretty much going to conflict with other plugins and wordpress’s base functions. Take it just as example, so what should be the correct way to do it? , what you can do is name them in unique way. let’s assume my plugin is named: Extra customised wordpress posts i will make it’s short name also ECWP then i can name the posts in this way : function ECWP_ShowPosts(){ } and also name the files in unique way: ecwp_posts.php this way i have my files and functions in unique way.

About the second thing, it’s very simple, If you have body { } or .container {} these kind of global and common properties without any parent so it can work just for your plugin and don’t go and conflict other’s wordpress / theme / plugins stylesheets. You should not use generic css names/rules as they are widely used by themes and your plugin can change the default behaviour of theme’s design.

Last words: Make your code. Clean / indent, Properly commented , Don’t freely use generic css properties.


#3

Amazing feed back then the reviewer, (y)
By the way its not wordpress its a gallery made in HTML and JS and no php script used.
My gallery tree is like that:
css (folder)
mobilecss.css
main.css
images (folder)
all images need to show on gallery
js (folder)
jquerymin.js
main.js
index.html
License.txt
Documentation.docx


#4

I miss understood by the term only Plugin, cause most of them are of wordpress.

so as you can see your files are named somehow : index.html , main.js , main.css. i think you should rename the files into something unique such as : advanced_gallery.html , advanced_gallery.css and so on , choose your own way of naming your gallery with unique name.


#5

Ah okey (y), but i guess i will meet a problem in uploading because no index file included if i changed index to DHF.html [DHF is the name of gallery] (i just noticed on priview field should have index file [ZIP file containing an index.html (case sensitive) and any supporting js scripts or images you need] )
Thank you for your time.