This module adds integration with Twitter-Post-Fetcher in Drupal 7.
Twitter-Post-Fetcher gets and displays your tweets on your website using JavaScript, without using the Twitter API.
Project links
https://www.drupal.org/sandbox/d.push/2650716
Git:
git clone --branch 7.x-1.x git.drupal.org:sandbox/D.push/2650716.git simple_tweets
cd simple_tweets
This module requires Twitter-Post-Fetcher library, please read readme file or project page.
Manual reviews of other project:
https://www.drupal.org/node/2692493#comment-11043375
https://www.drupal.org/node/2621380#comment-11039653
https://www.drupal.org/node/2696141#comment-11047173
https://www.drupal.org/node/2584973#comment-11242933
https://www.drupal.org/node/2733173#comment-11245819
https://www.drupal.org/node/2735081#comment-11246109
Comments
Comment #2
benellefimostfa commentedManual Review
You have many issues related to coding standards + some errors.
You can see the full report her:
http://pareview.sh/pareview/httpgitdrupalorgsandboxdpush2650716git
PS: your git clone command is "git clone --branch 7.x-1.x https://git.drupal.org/sandbox/D.push/2650716.git simple_tweets"
Comment #3
benellefimostfa commentedComment #4
D.push commented@benellefimostfa Thank you for review.
I've fixed the issues for coding standards.
Anyway, these problems should not block the module to become full project.
Have you found any other errors during Manual review (not using pareview)?
Comment #5
D.push commentedComment #6
pankajsachdeva commentedComment #7
pankajsachdeva commentedAutomated Review
No Reviews Found
Manual Review
- Please mention that 'Twitter-Post-Fetcher' library required.
I am not getting any result in the block. Can you please explain why?This review uses the Project Application Review Template.
Comment #8
pankajsachdeva commentedComment #9
D.push commentedComment #10
D.push commented@pankajsachdeva Thank you for review.
Did you enter a wrong widget ID. The new version of the module involves checking the widget ID on twitter website.
Comment #11
D.push commentedComment #12
PA robot commentedWe 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.
Comment #13
manojbisht_drupal commentedHi,
The file which u have defined is not as per the drupal naming standard, like u have defined file with admin.inc under includes folder in module folder. While it should be somewhat like: simple_tweets.admin.inc
Comment #14
klausiThat alone is surely not an application blocker, anything else that you found or should this be RTBC instead?
Comment #15
manojbisht_drupal commentedHi,
I think there is some issue with images in twitter widget, as I placed block for simple tweets,in sidebar first. It is loading fine, until I enable the checkbox for Show Images. as Images are coming out of div, and it is looking weird.
Comment #16
D.push commented@manojbisht_drupal
Hello, I've added css file in module.
Comment #17
D.push commentedComment #18
D.push commentedComment #19
D.push commentedComment #20
th_tushar commentedHi @D.push,
I have manually reviewed your code, below are the findings.
variable_del('simple_tweets_id');instead ofvariable_del('simple_tweets__id');simple_tweets_block_view()function,libraries_load('Twitter-Post-Fetcher');should be belowif ($delta == 't-w-block') {line, so that the library gets loaded only if the block is rendered on a page.Changing the status to "Needs work". Please flip the status back to "Needs review" once the above issues are fixed.
Comment #21
D.push commentedHI @th_tushar,
thanks for your review! I fixed this.
Comment #22
feyp commentedAutomated Review
pareview.sh found some minor issues. While these should be fixed, it is not a blocker.
Manual Review
includes/lib_api.inc, line 30+: As a best practice, never place code outside of a function! If you really want this code to be executed on every page request, there are hooks for that (e.g. hook_preprocess_page() or hook_init(), just to name a few options). That said, the best approach in this case would probably be to either implement hook_requirements() or to only show this message in a few distinct places, e.g. on your configuration page (place it in the page callback of the configuration page) and when your block is shown (place it in your implementation of hook_block_view()).require_once(). Instead, use module_load_include(). Also, as a best practice, do not include files outside of functions. Yourincludes/lib_api.incjust contains one hook implementation (and a few lines of code, which should be in another hook, see above). Why do you need a separate file just for this one hook implementation? As a best practice and for performance reasons, move yourhook_libraries_info()implementation into your module file and remove yourincludes/lib_api.incfile.add.js, line 8: As a best practice, prefix your behaviour names with your module name to prevent naming collisions with other contributed modules or core.add.js, line 19: To facilitate localization of your module, please useDrupal.t()to make your string translatable. See Translating strings in JavaScript for more information.hook_block_view()andadmin.inc: As a best practice, please provide sensible default values for all yourvariable_get()(i.e. use the second parameter). Also, I guess for some of the settings, there just aren't any sensible default values (like the widget id). For those variables, consider checking, if the user already configured a value, before you render your block.includes/admin.inc: As a best practice, please name your include files likemodule_name.something.inc, i.e.simple_tweets.admin.incin this case.hook_help(): Why do you check for aREADME.mdfile, if you don't have one? Also, consider usingdrupal_get_path()instead ofdirname(__FILE__)to get the path to your module directory. Since you don't use markdown, you can also get rid of the check for markdown module. A check_plain() or a check_markup() in combination with filter_default_format() before showing the output of yourREADME.txtfile might also make sense just as a precaution.hook_block_info(): Since your block is showing the same output on every page, the default cache setting for blocks (DRUPAL_CACHE_PER_ROLE) doesn't make much sense. Consider defining a suitable cache level here by specifying thecachekey in your block definition.hook_block_view(): Instead of callinglibraries_load()here, as a best practice, add your library using#attachedlike this:$block['content']['#attached']['libraries_load'][] = array(Twitter-Post-Fetcher');. Also, you might want to check, if the library is actually installed, before rendering the block.hook_block_view(): As a best practice, put all your settings in a bucket with your module name (e.g.Drupal.settings.simple_tweets.id). That way, you could also add all the settings at once. Untested example:add.js, line 25+: As a best practice, instead of callingDrupal.settings.settingto get your settings, use the settings parameter to get your settings:settings.settingadd.js: To make your code work with other contributed modules, that use Drupal's AJAX API, make sure to only call your code once per block, e.g. by adding aprocessed-simple-tweetsclass to your block after processing and checking for this class before doing anything. Also make sure, that you only apply changes to that part of the DOM present in thecontextparameter.add.js: Since you don't use jQuery, you probably don't need to pass this to the closure.add.js: By looking at the documentation of TwitterFetcher, I can't find an optionPermalinks. Should this setting be assigned to theshowPermalinksoption instead, which is always set tofalsenow? If not, why not provide a separate setting in your configuration form forshowPermalinks?admin.inc: Why do you provide a separate configuration page for your block instead of just using hook_block_configure() to provide a configuration form for your block?admin.inc, line 9: There is nohook_form(). Instead, this is a form builder function for your form.admin.inc, line 15: Maybe add a sentence on how to obtain this id to the description or link to a suitable documentation page provided by Twitter? It might not be obvious for all your users.admin.inc, line 93: It might be a good idea to sort your options alphabetically by value so that users can easier locate their desired language. Also, it would be a good idea to do this dynamically to sort by localized values instead of the English strings.admin.inc, line 95: Why is the key for French in upper case when the rest of the keys is all lower case? Is this a typo? Also, why is French the default language? While I don't have anything against French in particular, I guess a good default value would be English or, better yet, the default language of the Drupal instance.admin.inc, line 169: There is nohook_validate(). Instead, this is a validation callback function for your form.admin.inc, line 180+: Consider wrapping this code in anelseclause of your widget id validation above to only perform the HTTP request, if the widget id has a valid format.admin.inc: Shouldn't Premalinks be Permalinks? If so, maybe also rename the variable before a stable release for clarity.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.
Revision reviewed: cbd7ead
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.
Comment #23
D.push commented@FeyP Thank you for your review, it was very helpful!
About 11 .I have not earned this option (I tried to Drupal 7.16 and Drupal 7.43)
Item 16: I think this way is better.
Item 19: I get it from twitter api.
I fixed other issues.
Comment #24
naveenvalechaAssinging to myself to review that probably be tonight.
Comment #25
klausilooking at this now.
Comment #26
klausimanual review:
Otherwise looks good to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning back to Naveen as he might have time to take a final look at this.
Comment #27
D.push commentedTasks 2-4 have been solved.
Comment #28
D.push commentedComment #29
D.push commentedComment #30
mlncn commentedThanks for your contribution! Congratulations, you are now a vetted Git user. You can promote this to a full project.
When you create new projects (typically as a sandbox to start) you can then promote them to 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.
Comment #31
D.push commentedComment #32
naveenvalechaunassigning from myself.