Hello! Please review my modules. They were created for use in Drupal 7.x.
About:
'Minecraft Status' displays information about a Minecraft server, like how many players are online and what version it is running. It uses another module called 'Mineraft Query', which exposes xPaw's PHP-Minecraft-Query library. I also have a third module, 'Minecraft Players', which displays a list of pictures and names of the players online. This module also is dependent on Minecraft Query.
Use:
To use this module, download and set up as normal (git), and enable the blocks created by the modules. Then, configure the blocks to have the correct ip, port, and protocol. Your server must be online and accessible via TCP for ping, or UDP for Gamespy4, on the given port for the data to be displayed correctly. Also, please note that plugins like ServerListPlus that modify the server ping will make the output of the 'Minecraft Players' module all whacky, because they modify the player sample data.
Why?:
There are some other ping modules out there, but they are all specific to one server and sandboxed/experimental. This module is... well... modular. It allows you to enter your own information and use multiple protocols.
About Me:
I am a student of computer science at Rhode Island College. I nerd out hardcore on Minecraft. Been trying to give back to the community by uploading these modules. I use Drupal to make websites for myself and others, and I'm currently building a portfolio.
This Project:
Link: Minecraft Status
Repo: git clone --branch 7.x-1.x https://git.drupal.org/sandbox/mrmysterious2502/2775175.git minecraft_status
My Other Projects:
Minecraft Query
Minecraft Query repo
Minecraft Players
Minecraft Players repo
Comments
Comment #2
PA robot commentedProject 1: https://www.drupal.org/node/2775795
Project 2: https://www.drupal.org/node/2775227
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpsgitdrupalorgsandboxmrmysterious25022775...
Fixed the git clone URL in the issue summary for non-maintainer users.
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.
Comment #4
mrmysterious2502 commentedThere are no errors in the auto review application, although it does say I should unit test. I understand now that I should remove the 3rd party libraries from the Minecraft Query module and require the use of the Libraries module. On it...
Comment #5
mrmysterious2502 commentedThird party libraries have been removed and the module now requires the 'Libraries' and 'X Autoload' modules as dependencies. Please review. Thank you.
Comment #6
mrmysterious2502 commentedComment #7
mrmysterious2502 commentedComment #8
yogeshmpawarComment #9
mlevasseur commentedRe-organized the OP a bit to make it more obvious which links are relevant to this issue.
Comment #10
mlevasseur commentedHey mrmysterious2502,
I wanna start off by saying your code looks pretty solid, and was pretty easy to review which is always nice. [shameless plug incoming] you should check out PlayMC, a minecraft server the company I work for built and maintains :)
The format of the review is going to follow a format where I point out any Drupal Coding Standards issues in a file and then do a function-by-function analysis of the code, highlighting any issues I find. Keep in mind that any coding standard problems I find I won't repeat for each file, so make sure to go through your entire code base to catch any potential problems.
minecraft_status.module
General coding style comments:
• Your functions should not begin and/or end with blank lines. eg. do
instead of
• The previous comment applies to your switch statements too. Also, a space is mandatory between 'switch' and the parenthesis. eg.
• Long array declarations should be broken up onto several lines (look at line 98 in the file as an example that needs to be fixed):
• All control structures (if, elseif, for, while, switch, etc.) must have a space between the word and the opening parenthesis.
Ex.
if (true) {...}instead ofif(true) {...}functions:
minecraft_status_help: There is no need to call 'break;' after a 'return' statement. Although, best practice would be to store your help string in a variable, break out of the switch statement and then return the variable instead.
_minecraft_status_block_content:
• You're missing a doc-block for this function.
• Merely a suggestion, but it would be much easier to read if, instead of having 'case 0/1/2', you defined PING, OLD_PING, and GS4 to have the values 0/1/2 and use those in your switch statement. Ex.
• Any time you use 'variable_get' it is best practice to provide it a default value, even if it's null.
variable_get('foo', 'default_value');• You're doing a lot of weird string concatenation. For instance, line 187
$info['status'] = '' . t('Online') . '';should instead just be$info['status'] = t('Online');• Lines 203, 204, 205, 227, 228, 229: there is no need to wrap '!' with the t() function. '!' doesn't translate to anything.
minecraft_status_uninstall:
• This function belongs in a .install file. You have to create a file called minecraft_status.install and move this in there instead.
• Use variable_del(), not variable_set(), to delete custom variables your module creates.
css/minecraft_status.css
General coding comments: (Please review this document regarding Drupal CSS standards)
Make sure to remove all the blank lines you have inside of your style blocks.
In general, it's almost always best to try to avoid IDs as a selector, especially ones as generic as "offline" and "online". If there's another way you can target those elements, or change the name to something a bit more unique that would be best I think.
templates/minecraft-status--block.tpl.php
Extreme nit-pickyness :) Please replace 'echo' with 'print'
Comment #11
mlevasseur commentedChanging to needs work and removing the PAReview bonus. Please do 3 more reviews to regain a permanent bonus :)
Comment #12
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #13
mrmysterious2502 commentedExcellent review. Great criticisms. Thank you for reviewing my module. I'm on it...
Comment #14
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #15
mrmysterious2502 commentedAll code has been revised as per the suggestions given. Please review. Thank you.
Comment #16
djalxs commentedReview of the 7.x-1.x branch (commit fe84c0e):
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.
Please fix the above before your project application can proceed. Normally, perfect adherence to coding standards is not an application blocker, but with the amount picked up above, I would suggest that at the very least these are fixed before RTBC status is set.
Comment #17
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.