Skip to main content
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
Source Link

When developing a plugin, should I includes the blank index.php file and then add my functions in the plugin-name.php? Or is that unnecessary? What file structure is recommended?

This?

/some-plugin/some-plugin.php (functions)
/some-plugin/index.php (blank)

Or this?

/some-plugin/index.php (functions)

From doing some research on WPSE, I have found a Q&A related to my own question:

However, this question is over four years ago and I wanted to know if this is still a recommendation for ethical plugin development nowadays.

The answers that were given by WyckWyck and toschotoscho bring up interesting points on both sides of the spectrum:

  1. For: security through obscurity works, bots compile the plugin lists right off WordPress.org and crawl the plugin's URL directly
  2. Against: unused PHP files in that directory are wasting time and memory when WordPress is searching for plugins

Are these two statements true? What's the latest update?

When developing a plugin, should I includes the blank index.php file and then add my functions in the plugin-name.php? Or is that unnecessary? What file structure is recommended?

This?

/some-plugin/some-plugin.php (functions)
/some-plugin/index.php (blank)

Or this?

/some-plugin/index.php (functions)

From doing some research on WPSE, I have found a Q&A related to my own question:

However, this question is over four years ago and I wanted to know if this is still a recommendation for ethical plugin development nowadays.

The answers that were given by Wyck and toscho bring up interesting points on both sides of the spectrum:

  1. For: security through obscurity works, bots compile the plugin lists right off WordPress.org and crawl the plugin's URL directly
  2. Against: unused PHP files in that directory are wasting time and memory when WordPress is searching for plugins

Are these two statements true? What's the latest update?

When developing a plugin, should I includes the blank index.php file and then add my functions in the plugin-name.php? Or is that unnecessary? What file structure is recommended?

This?

/some-plugin/some-plugin.php (functions)
/some-plugin/index.php (blank)

Or this?

/some-plugin/index.php (functions)

From doing some research on WPSE, I have found a Q&A related to my own question:

However, this question is over four years ago and I wanted to know if this is still a recommendation for ethical plugin development nowadays.

The answers that were given by Wyck and toscho bring up interesting points on both sides of the spectrum:

  1. For: security through obscurity works, bots compile the plugin lists right off WordPress.org and crawl the plugin's URL directly
  2. Against: unused PHP files in that directory are wasting time and memory when WordPress is searching for plugins

Are these two statements true? What's the latest update?

toscho will kill you. hahahaha
Source Link
Mayeenul Islam
  • 12.9k
  • 21
  • 85
  • 169

When developing a plugin, should I includes the blank index.php file and then add my functions in the plugin-name.php? Or is that unnecessary? What file structure is recommended?

This?

/some-plugin/some-plugin.php (functions)
/some-plugin/index.php (blank)

Or this?

/some-plugin/index.php (functions)

From doing some research on WPSE, I have found a Q&A related to my own question:

###Should Plugin Folders Include a Blank index.php File?

However, this question is over four years ago and I wanted to know if this is still a recommendation for ethical plugin development nowadays.

The answers that were given by Wyck and teschotoscho bring up interesting points on both sides of the spectrum:

  1. For: security through obscurity works, bots compile the plugin lists right off WordPress.org and crawl the plugin's URL directly
  2. Against: unused PHP files in that directory are wasting time and memory when WordPress is searching for plugins

Are these two statements true? What's the latest update?

When developing a plugin, should I includes the blank index.php file and then add my functions in the plugin-name.php? Or is that unnecessary? What file structure is recommended?

This?

/some-plugin/some-plugin.php (functions)
/some-plugin/index.php (blank)

Or this?

/some-plugin/index.php (functions)

From doing some research on WPSE, I have found a Q&A related to my own question:

###Should Plugin Folders Include a Blank index.php File?

However, this question is over four years ago and I wanted to know if this is still a recommendation for ethical plugin development nowadays.

The answers that were given by Wyck and tescho bring up interesting points on both sides of the spectrum:

  1. For: security through obscurity works, bots compile the plugin lists right off WordPress.org and crawl the plugin's URL directly
  2. Against: unused PHP files in that directory are wasting time and memory when WordPress is searching for plugins

Are these two statements true? What's the latest update?

When developing a plugin, should I includes the blank index.php file and then add my functions in the plugin-name.php? Or is that unnecessary? What file structure is recommended?

This?

/some-plugin/some-plugin.php (functions)
/some-plugin/index.php (blank)

Or this?

/some-plugin/index.php (functions)

From doing some research on WPSE, I have found a Q&A related to my own question:

However, this question is over four years ago and I wanted to know if this is still a recommendation for ethical plugin development nowadays.

The answers that were given by Wyck and toscho bring up interesting points on both sides of the spectrum:

  1. For: security through obscurity works, bots compile the plugin lists right off WordPress.org and crawl the plugin's URL directly
  2. Against: unused PHP files in that directory are wasting time and memory when WordPress is searching for plugins

Are these two statements true? What's the latest update?

Source Link
Ethan Rævan
  • 4k
  • 5
  • 27
  • 55

Plugin development: is adding empty index.php files necessary?

When developing a plugin, should I includes the blank index.php file and then add my functions in the plugin-name.php? Or is that unnecessary? What file structure is recommended?

This?

/some-plugin/some-plugin.php (functions)
/some-plugin/index.php (blank)

Or this?

/some-plugin/index.php (functions)

From doing some research on WPSE, I have found a Q&A related to my own question:

###Should Plugin Folders Include a Blank index.php File?

However, this question is over four years ago and I wanted to know if this is still a recommendation for ethical plugin development nowadays.

The answers that were given by Wyck and tescho bring up interesting points on both sides of the spectrum:

  1. For: security through obscurity works, bots compile the plugin lists right off WordPress.org and crawl the plugin's URL directly
  2. Against: unused PHP files in that directory are wasting time and memory when WordPress is searching for plugins

Are these two statements true? What's the latest update?