Post By Email: OPW is over!

I can hardly believe it, but my summer internship is drawing to a close.

This week, I released version 1.0.4 of the Post By Email pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party, comprised of minor bugfixes, tests, and documentation as I prepped the project for its evaluation phase.  I’ve added quite a bit of info to the readme page, including better installation and configuration instructions.

Those of you following along on TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. may have noticed that I’ve kind of run out of tasks.  🙂

Today is the official end of the OPW and GSoC programs, so I’ll be taking a short break from development work during the evaluation period.  But this isn’t goodbye!  I definitely plan to stick around and continue working on and supporting this project in the future — so keep those bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. reports coming!

I do want to take a second to thank all of you for being here for me as I learned the ins and outs of WordPress this summer.  I feel really good about where this project landed, and I know it’s because I had so many amazing resources every step of the way.  So, to everyone who left me comments, answered my questions on IRCIRC Internet Relay Chat, a network where users can have conversations online. IRC channels are used widely by open source projects, and by WordPress. The primary WordPress channels are #wordpress and #wordpress-dev, on irc.freenode.net. or Twitter, reviewed my code, tested, reported bugs, offered suggestions, spoke at WCSF, or even just edited a Codex page or wrote a quick tutorial now and then: THANK YOU.  It really made the difference in those moments when I felt frustrated or overwhelmed.

I don’t know exactly what the future holds, but I do know that I love being a part of WordPress, and I’m excited to continue working with y’all.  Let’s keep in touch.  🙂

#post-by-email, #weekly-update

Post By Email Plugin: Version 1.0 is live!

I just released version 1.0 of the Post By Email pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party, which includes the following updates:

  • Support for IMAP and SSLSSL Secure Sockets Layer. Provides a secure means of sending data over the internet. Used for authenticated and private actions. connections
  • Option to “mark as read” instead of deleting messages after posting them (IMAP only)
  • Only fetch unread messages (IMAP only)
  • Added contextual help to the adminadmin (and super admin) panel
  • Support for HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers.-formatted emails
  • Under the hood: refactoring, bugfixes, properly checking nonce for AJAX requests, etc.

I also made some changes to the CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. and added it to the corresponding Trac ticket for community review.

Please do install and test this version and let me know how it goes!

This plugin is in betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process.; the usual caveats apply.  Please be sure to back up your data and/or run this against a test email account.

As always, you can download the plugin from the official repository or from the Github mirror.

#post-by-email, #weekly-update

Post By Email weekly update

This week, I finally released the Post By Email pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party into the official repository, which inspired me to do a lot of incidental cleanup (readme files, test instructions, etc.).

I finished updating the CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. deprecation patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. for 3.7 — it’s in the plugin repo and will be submitted back to TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. once my mentors get a chance to review it.  (Comments and feedback welcome!)

I also powered through the remaining infrastructure tasks.  The latest version is 0.9.9 (look how close that is to 1.0!  SO CLOSE) and includes the following:

  • Improved error and status logging
  • Scheduled mail checks via wp_cron
  • Prettified settings page (with stuff like consistent date/time display)
  • Autoloading of Horde library files (HT to ryanmccue for the example)

If you happen to have access to an unsecured POP3 mail server and want to test this and see what breaks, I’d love to hear about it.  (Be sure to patch Core with the deprecation patch first to avoid weird behavior.)

The 1.0 release will include IMAP and SSLSSL Secure Sockets Layer. Provides a secure means of sending data over the internet. Used for authenticated and private actions., at which point I will start requesting betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. testers in earnest.

I just spent the last few hours tracking down a bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. in my clear_log function, which turned out to be caused by the Settings APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. validation function being triggered when an AJAX function (called from the settings page, but not with a form submit) called update_option.  I worked around that, but haven’t yet figured out why it’s happening at all — any insights would be appreciated.

#post-by-email, #weekly-update

Post By Email: Roadmap for the final stretch

I met with my mentors this past week to hash out the spec for the final iteration of the Post By Email pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party.  It can be found here; I’m updating it as I finish tasks, as well as tracking them in the GSoC Trac.

This week, I tested under PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 5.2 and made a few small changes to the Horde library files to support both 5.2 and 5.3 (the Horde framework requires a minimum of 5.3).  I also refactored the adminadmin (and super admin)-specific methods (adding menus and so on) into their own class, which is loaded only if is_admin().

Of the original feature list, we’ve decided that supporting multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site is currently out of scope (though it may well work anyhow — it’s globally disabled in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. for a multisite install, but I can’t think of any reason to restrict it for the plugin).  Attachments and comment reply via email are on the “nice to have” list, meaning I might not get to them (at least, not before the official internship period ends).

#post-by-email, #roadmaps, #weekly-update

Post By Email: Getting back on track

It has sadly not been a very productive couple of weeks in Post By Email land — I’ve been struggling to balance conferences, travel, illness and other obligations, and ultimately hit that not-so-fun point of needing to take a few days off because the more work I tried to do, the less I was able to do.

The good news is, I’m regrouping and made a few updates to the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party — mostly minor fixes and code style cleanup.  This coming week, I’m planning to work with my mentors on the final roadmap of additional features that will be implemented between now and the end of September, so I will have that to share with you next week.

#post-by-email, #weekly-update

Post By Email Update: Horde library!

After much wailing and gnashing of teeth, I was finally able to get the Post By Email pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party working against the Horde IMAP Client Library.

It’s a bit of a hack right now — I still need to clean up the code and pull a lot of it out into helper functions — but with this in place, I’ve laid the groundwork for supporting SSLSSL Secure Sockets Layer. Provides a secure means of sending data over the internet. Used for authenticated and private actions. and IMAP connections (without requiring PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher to be compiled with IMAP support).

A couple of technical oddities…

  • The Horde framework is massive, and while the IMAP library is available as a standalone PEAR package, it still has a ton of dependencies to the rest of Horde.  I solved the problem in a quick-and-dirty way by copying any missing files into the plugin’s includes directory.  Horde uses an autoloader to include the classes it needs; I’m planning to experiment with that, but for now I just wrote a wrapper (so I only have to include one file in the plugin class).  (Does anyone know whether autoloading plays nicely with WP?)
  • Instead of copying over the translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. classes, I stubbed out one of them in a “bogus” way that uses WP’s translation functions instead.  Might poke around and see whether I can do this with any of the others, as well.

The good news is that, once I got this working, I was able to scrap the whole preexisting deal with reading each message line by line and processing it with (buggy) regexes… and move to letting Horde abstract parsing out headers, decoding MIME, etc.  This will also make it much easier to deal with HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. emails, attachments, and so on in the future.

For now it still supports only POP3, but unlike the previous iteration, it doesn’t lose all the text and create blank posts — certainly an improvement.  🙂

Next steps: Refactor check_email into helper functions and add support for IMAP, then SSL connections.

#post-by-email, #weekly-update

Post By Email playing hooky this week

It’s been a long week and I’m in the midst of a few things that just aren’t quite working yet. Normally my inclination would be to stay up late hacking it into shape and writing a blogblog (versus network, site) post… but today, it’s more important to me to get to bed early so I don’t miss any sessions at WCSF tomorrow!

Post By Email will return to regularly-scheduled updates with a longer one next Thursday. In the meantime, if you’re at WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what they’ve learned throughout the year and share the joy. Learn more. this weekend, be sure to say hi!

#post-by-email, #weekly-update

Post By Email Update: POP/IMAP libraries, Trac questions

Rather unexciting update this week, as I’m still in the midst of a few things (and have been distracted by caring for a cat who had some teeth pulled… poor kitty!).

As I mentioned last week, in reading through old TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets, I learned that the POP3 class we’re using to read emails was originally copied over from SquirrelMail.  I’ve been digging into their SVNSVN Subversion, the popular version control system (VCS) by the Apache project, used by WordPress to manage changes to its codebase. repo in hopes of being able to adopt (1) an updated POP library that might include fixes for some of the bugs we’ve found, and (2) an IMAP library that we can similarly adapt to our own uses.

It’s an interesting adventure trying to reconstruct years of history from bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. tracker and commit logs… at any rate, it appears the POP3 library originally came from a SquirrelMail pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party called “mail_fetch”, which was since merged into SquirrelMail coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress..  Complicating matters, the file was renamed from class-pop3.php to class.mail_fetch.php.  But I did ultimately track it down!

However, while the development branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". of SquirrelMail now has “some plumbing” to support remote IMAP servers, I’m not sure whether any of that code will be useful for our needs — it’s not just still under development, but much more intertwined with the rest of SquirrelMail’s code, as opposed to being a standalone class.  At this point I’m more inclined to go with a different library, and have been researching alternatives; the top contender right now is the Horde IMAP library, which also includes an abstraction layer for POP3 (but I’m open to suggestions, if anyone has a favorite).  In the next week, I plan to load that into the plugin and see if I can get it working to support a wider variety of mail servers.

In other news, I’ve found myself fighting with Trac a lot lately.  I’m curious how all y’all keep track of tickets — both existing ones that you want to receive notices about, and new ones coming in that might be relevant to your interests.  Do you have custom searches bookmarked, an RSS feedRSS Feed RSS is an acronym for Real Simple Syndication which is a type of web feed which allows users to access updates to online content in a standardized, computer-readable format. This is the feed., something else?  Please share any tips!

#post-by-email, #weekly-update

Post By Email Weekly Update

This past week, I continued delving into the mysteries of unit testing, and ended up submitting a minor patch back to the unit-tests repo (after spending some time trying to figure out what was wrong with my setup that was causing one of the tests to fail on coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.).

The Post By Email pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party now has working tests for activation, but not yet for the main functionality, which will require further research to learn how to mock out email retrieval.  (I’ve back-burnered this for the moment.)

I also spent some time wandering around TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress., and learned that a problem I’ve been having is actually an ancient bug, which I then tracked down to a misbehaving regex that is supposed to determine the charset of the email.  It requests that iconv transform the given text into the garbled charset, gets nothing back, and proceeds to cheerfully create an empty post.  I haven’t fixed it yet, as I’m hoping to replace large swaths of that code with a new library anyhow (apparently we originally got that POP3 library from SquirrelMail, which does now support IMAP and SSLSSL Secure Sockets Layer. Provides a secure means of sending data over the internet. Used for authenticated and private actions., so that’s the first place I’ll look unless there are other recommendations).

Finally, I collated the plugin’s status and error messages into a mini-log, and added a quick status overview to the settings page.  I also put a “check now” button in the settings.  Right now it just logs the result of the most recent check; ultimately I plan to show a longer history, and also organize/format the messages better (errors color-coded, links to posts, etc.).

I tweaked a few more things about my setup this week, and am now mirroring the plugin source on Github, if GitGit Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. Most modern plugin and theme development is being done with this version control system. https://git-scm.com/. happens to be more your cup of tea.

Next, I’m focusing on developing a patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. to deprecate Core, and vetting existing plugins to ensure backward compatibility.

#post-by-email, #weekly-update

Post By Email update: tests and multiple WP versions

First off: After I mentioned last week that I needed a POP mail account to test with, several folks with their own mail servers offered their help.  I’m set up with something now.  Thanks to all who reached out!

The past week has been all about testing, with the goal of getting good unit and/or integration tests written for the Post By Email pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party before I start adding features to it.  This is entirely new territory for me, though I’ve done some TDD in Ruby in the past.  So far, I’ve learned how the tests work on CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., and gotten a whole mess of things installed and running (wp-cliWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/, Pear, PHPUnit, etc.).  I followed this guide to set up the basic test structure for the plugin.  I was hoping to have some actual tests done for this week’s update, but it took a bit longer than expected to get the framework set up, so I don’t have anything ready for primetime yet.

So, this week’s question: What are some plugins that have really good tests?  I’m seeking examples of what to do (or not to do!).  I’m especially curious to see tests of Settings APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. stuff and install/activation functions.

Side note: I really need to clean up my development setup for testing against multiple WordPress versions.  I have several versions installed already, but they’re pretty haphazard (with different databases, inconsistent directory names, etc.).  I found this very good post about a development setup with multiple WP versions.  For those of you who support plugins or themes on multiple versions — any tips?  Is your setup similar to that post?

#post-by-email, #weekly-update