About

Extra Site Information module provides Drush commands and UI level view to see the count of Nodes, Content types, Users, Roles existing in the site.
This module also provides the information about Currently loggedin users in your site.

Usage

"nodetypecount" command will return the number of Content Types present in the site, you can use command in following ways.
drush nodetypecount --help
drush nodetypecount

"nodecount" command will return the number of Nodes present in the site, you can use command in following ways.
drush nodecount --help
drush nodecount
drush nodecount < content-type-names >
drush nodecount page article

"rolecount" command will return the number of Roles present in the site, you can use command in following ways.
drush rolecount --help
drush rolecount

"usercount" command will return the number of Users existing in the site, you can use command in following ways.
drush usercount --help
drush usercount
drush usercount < role-ids >
drush usercount 3 4

Visit "admin/extra-siteinformation" for UI level view of data.

Currently loggedin users in your site. Visit "admin/extra-siteinformation/currently-loggedin-users".

Project page:
https://www.drupal.org/sandbox/heykarthikwithu/2548369

Git instructions:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/heykarthikwithu/2548369.git extra_siteinfo

Pareview review:
http://pareview.sh/pareview/httpgitdrupalorgsandboxheykarthikwithu254836...

Similar Modules:
https://www.drupal.org/project/siteinfo
https://www.drupal.org/project/sitedoc
https://www.drupal.org/project/node_type_count
Extra Siteinfo modules differs from the listed modules,
This module provides drush commands to see the site info.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

heykarthikwithu created an issue. See original summary.

heykarthikwithu’s picture

Status: Active » Needs review
PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

Pravin Ajaaz’s picture

Hey Karthik,

I just installed your module and had a good look at the module's code & usage.

You have coded it so developer friendly and I couldn't find any blocking issues in your module. But I have some suggestions for you:

1. Please provide information of similar modules and how your module differ from them?

I know few modules which solve the same purpose:

https://www.drupal.org/project/siteinfo
https://www.drupal.org/project/sitedoc
https://www.drupal.org/project/node_type_count

2. Please try to collaborate with existing work if possible. Especially (https://www.drupal.org/project/sitedoc) is a well built drupal 6 module, you can help it have a drupal 7 stable release. But module duplication is no more a blocker. So you can choose the way, you are going to proceed.

So update your module description page with the similar modules section. Leaving it as "Needs review" for others to take a look at it. After some more reviews, I am glad to set it to RTBC.

rakesh.gectcr’s picture

Well, this module is working fine for me I have little different thoughts with the comment of @Pravin Ajaaz about https://www.drupal.org/project/sitedoc,
This modules provides drush commands , That looks quite useful for me . Even i am lso agreeing with @Pravin for Leaving it as "Needs review" for others to take a look at it. After some more reviews, I am glad to set it to RTBC.

heykarthikwithu’s picture

Issue summary: View changes

Hi Pravin,
Updated module description page with the similar modules section.

purushotam.rai’s picture

Status: Needs review » Needs work

Hi,

Thanks for your contribution and I think this module is very useful. I was testing this on my local install and found one issue.
Issue:

  1. When I visited "/extra_siteinfo", It is showing WSOD. Please check.

I have few recommendations regarding the module which I believe as a developer I want few changes like I am describing below :

  1. In menu paths, there should be - (hyphen) instead of _ (underscore)
  2. In hook_menu if descriptions are provided then they must be meaningful and no need for blank descriptions.
  3. At admin/config/system/site-information/extra_siteinfo/currenlty_loggedin_users there is an entry for anonymous user (0) too which can be ended.
  4. Change "currenlty" to "currently".
  5. File name for "extra_siteinfo.inc" might be "extra_siteinfo.admin.inc", for better readability.
  6. I believe extra site info should be under Reports instead of configuration settings because there are no configurations in it.
  7. For extra_siteinfo menu item, if it contains administration settings then it should be under admin/config path.
  8. The page "admin/config/system/site-information/extra_siteinfo/" using extra_siteinfo_form() does not contain form, so why there is need of form, i think you should use theme function directly.
  9. Table Alias should be short.
heykarthikwithu’s picture

Issue summary: View changes
Status: Needs work » Needs review

hey,
these recommendations are very interesting,
i agree with all the above made recommendations, only one change of renaming the inc file with admin.inc file is not made, because the code in the inc file is related to currently logged-in users and filtering of the data.

And WSOD was because, i was expecting my code to make redirection, which was not happening. This is been fixed now.

And about "there is an entry for anonymous user (0) too which can be ended.", Try check this scenario with fresh installation of drupal.
I am sure about this, because i tested this case, which was not reproducible.

heykarthikwithu’s picture

hi purushotam.rai,
updated the changes for the manual review.

renukadrupal’s picture

Hi,

I have installed this module and had a good look at the module's code and the usage
the code was developer friendly and I did not find any blocking issues in this module.

Can be moved to RTBC with +1.

Saraswathi Ravikumar’s picture

Hi,

The admin UI interface can be rendered in seperate fieldset for each block . so that it might provide good look and feel to the admin page.

Thanks,
Sarah.

heykarthikwithu’s picture

hi renuka and sarah,

thanks for reviewing the module.
admin UI interface which the information is provided is not incremental, i mean no more data will be appended to that page. Even though can be changed for look and feel, but if not this might not be a blocker.

thanks,
karthik

naveenvalecha’s picture

Status: Needs review » Needs work
FileSize
31.46 KB

Review of the 7.x-1.x branch (commit 77a9872):

  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Maybe: Does not cause module duplication and/or fragmentation.But as we are not no longer blocking duplicate project but we always prefer collaboration over duplication.
Master Branch
[Yes: Follows / No: Does not follow] the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Followsthe guidelines for project length and complexity.
Secure code
[Yes: Meets the security requirements. / No: List of security issues identified.]
Coding style & Drupal API usage
  1. extra_siteinfo.info : There is additional line in description.Due to it the rest part will not display on admin/modules page. See attached screenshot
  2. Readme.txt : Update the config path in the file.I would suggest you to use Readme Template
  3. hook_menu : The menu paths should follow the same context i.e. extra-siteinfo in extra-siteinformation/currently-loggedin-users/end-session/%
  4. extra_siteinfo_currently_loggedin_users_page: Usage of single quotes is recommended over double. This page provides the option to End the session of a particular user and this page is restricted under permissions "administer extra site info" . extra_siteinfo_currently_loggedin_users_page_end_session : This is vulnerable because we are performing ending of session with this path without a security token in the URL. See http://epiqo.com/en/all-your-pants-are-danger-csrf-explained and https://docs.acquia.com/articles/protecting-your-drupal-module-against-cross-site-request-forgeries
  5. extra_siteinfo_currently_loggedin_users_page_end_session : This is not returning any form there seems not usage of $form,$form_state ?
  6. This module provides a report of entities exist in the website.So the menu path should fall under the admin/reports

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

heykarthikwithu’s picture

Assigned: Unassigned » heykarthikwithu
heykarthikwithu’s picture

Assigned: heykarthikwithu » Unassigned
Status: Needs work » Needs review

Manual review changes mentioned under Coding style & Drupal API usage, are been updated in the module.

Ayesh’s picture

Hi there - I'm still reviewing the module but so far, you've done a great job. Many people forget to put a cofirmation form (in your case session terminate confirmation), making the module vulnerable to CSRFs. But you've done it well.

Let me ask about the scope of the module though.

The module name implies it provides information, but terminating a session is more of a user management task. I would consider choosing a better name that implies everything. But that's not task of project reviewers so o hope you'd take this merely as a suggestion.

- when counting number of nodes by node type, using a groupBy() call in your existing db_select statement will make things faster as it will require only one DB call (de your Drush DB calls).

naveenvalecha’s picture

Assigned: Unassigned » Ayesh
Status: Needs review » Reviewed & tested by the community

All my findings in #13 has been adressed specially #13.4 :) Things looks good now.Nothing blocker looking now.

Great!, Ayesh is already on this. Assiging to Ayesh to give it a final look if he has time.

heykarthikwithu’s picture

hi naveenvalecha, hey thanks Ayesh,
The module name implies it provides information, and their is also information of currently logged-in users, Making user logout is just on small extra feature for this module, and sure will put a appropriate description.
And groupBy() is been added while counting nodes by type, in the latest commit, http://cgit.drupalcode.org/sandbox-heykarthikwithu-2548369/commit/?id=cf...

naveenvalecha’s picture

Assigned: Ayesh » Unassigned
Status: Reviewed & tested by the community » Fixed

there were no blocking exceptions for more than a week, so ...

Thanks for your contribution, heykarthikwithu !

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.