Skip to content

Instantly share code, notes, and snippets.

@iandunn
Last active August 29, 2015 14:11
Show Gist options
  • Save iandunn/0c87245dca5c7ed48988 to your computer and use it in GitHub Desktop.
Save iandunn/0c87245dca5c7ed48988 to your computer and use it in GitHub Desktop.
WordPress.org Contributor Stat Snippets

All of these track the stats during a given year, so that they can be compared to stat collected during previous years.

Percent of code that is open source

Check out all the repositories into public and private folders inside a temp directory on your sandbox. Use your sandbox because some of the private repos contain passwords that you don't want on your laptop's hard drive.

Look at Slack_Trac::$tracs in api.wordpress.org for a list of Trac instances. Also look at https://github.com/wordpress in case there's anything there.

find -regex ".*\.\(php\|html\|js\|css\)" |xargs wc -l

Then run the above command on each folder to get a total number of lines in private repos vs public.

Number of pieces of code open-sourced (discrete chunks like themes, plugins, scripts, etc)

Compare meta.svn directory hierarchy against what it was at the last commit from the previous year.

svn log -r{2015-01-01}
svn up -r [revision above]
find . -type d -print
svn up
find . -type d -print

Then diff the two outputs and compare the differences. For all of the new folders, exclude the ones that are brand new code, so that you only count code that was moved from a private repo.

Number of sites added to the Meta Environment

Compare HEAD against the last commit from the given year. For single-site installs, just look at the folders in the root. For multisite, look at the wp_blogs table.

Number of patches submitted to Meta Trac

exclude people paid to work on meta

Number of people who submitted a patch to Meta Trac for first time

Average time between patch added to Meta Trac and reply from reviewer

Average time between patch added to Meta Trac and committed

Cleanup

  • Remove the temporary repositories you checked out on your sandbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment