Large size images hamper the loading time of the site. Imagesize check module gives the administrator a report of images that exceed the specified size hence helping to improve the front end performance of your Drupal site.
One more essential feature of the module is to - Report images which have been distorted while displaying because of the image style applied to them. There are some images which have 1:1 as their aspect ratio and image style applied to them has aspect ratio of 1:2. This distorts the shape of the image, hence making it appear uglier. All such images are reported.
Features of Imagesize check module :-
- Size limit check can be configured per image style.
- Reports all the images which exceed the maximum memory size.
- On cron run, all erroneous images are reported to administrator through email.
- Mail sent to the administrator is sent in tabular format using HTML+ MIME mail.
- Reports all the images which are not suitable for the image style applied to them depending on their aspect ratio.
- Images can be sorted depending on ascending/descending image aspect ratio difference.
Link to project :-
https://drupal.org/sandbox/neetumorwani/2086453imagesize check
Link to git repository
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/neetumorwani/2086453 imagesize_check
Links of other projects in project application queue reviewed by me
https://drupal.org/node/2186013#comment-8824371
https://drupal.org/node/2222795#comment-8824623
https://drupal.org/node/2275959#comment-8827057
https://drupal.org/node/2271545#comment-8841067
https://drupal.org/node/2223359
https://drupal.org/node/2251329#comment-8845395
https://drupal.org/node/2066011#comment-8848805
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | aspect ratio.png | 176.49 KB | neetu morwani |
| #3 | preset_size.png | 18.84 KB | neetu morwani |
| #3 | module name key html.png | 14.57 KB | neetu morwani |
| #3 | htmlmailsystem.png | 22.08 KB | neetu morwani |
Comments
Comment #1
neetu morwani commentedComment #2
neetu morwani commentedComment #3
neetu morwani commentedComment #4
alinouman commentedHi neetu,
1- First change Link to git repository to this
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/neetumorwani/2086453 imagesize_check2- On line 68 .module file you have unused nid variable, remove it
Thanks for your effort.
Comment #5
neetu morwani commentedComment #6
neetu morwani commentedThis has been fixed. All unused variables have been removed.
Comment #7
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 #8
alinouman commentedOn line 110 change your link because it takes me to nowhere. change this
l(t(' here '), 'admin/reports/image_preset_errors/image-preset-settings');to this
l(t(' here '), 'admin/reports/imagesize-check-errors/imagesize-check-settings');Comment #9
neetu morwani commentedThe Url issue has been fixed. Here takes to the correct page.
Comment #10
piyuesh23 commented@neetumorwani,
Module works in terms of functionality. Though, there are couple of small coding standards you need to modify.
imagesize_check.module line#60
Comment #11
neetu morwani commented@piyuesh23
This issue has been fixed.
-> Empty if condition has been removed.
-> Dsm removed.
-> Pager is configurable.
Comment #12
neetu morwani commentedComment #13
deepakaryan1988This module is looking nice which I really appreciate.
I was going through your module, I found some minor bugs , here they are:-
Anyhow, my suggestion is you can just update the values in custom table.
Automated tested by coder module
I think you are able to fix these, I would love to maintain this module in future. :)
Comment #14
deepakaryan1988Comment #15
deepakaryan1988Please have a look on this one also :-
http://pareview.sh/pareview/httpgitdrupalorgsandboxneetumorwani2086453git
Comment #16
neetu morwani commented@deepakaryan1988
The issue has been fixed.
- All the variables now get deleted on uninstallation.
- There were two errors in coding standards which have also been fixed.
-I appreciate your suggestion of updating the table instead of creating the table again. But according to the requirement of the module, creating the table takes less time and overhead consumption is less. The module assumes that the event would not be the frequent one.
-As far as dependencies are concerned, I am considering your suggestion and in the next release of the module most dependencies would be removed and they will be available as configuration.
Comment #17
neetu morwani commentedComment #18
dipen chaudhary commentedI'm excited about the aspect ratio report --
https://drupal.org/node/2175071
@Neetumorwani,
I think you should change the name of the module in light of above feature.
Comment #19
dahousecat commentedHi Neetu,
I found a few errors and warnings using the automated review at pareview.sh.
Results of the review can be found here:
http://pareview.sh/pareview/httpgitdrupalorgsandboxneetumorwani2086453git
Manual Review:
On the Image Glitches report the line that says "You can set the values for the maximum memory size of each image preset style fromhere" needs a space between from and here, and also a full stop as can be seen in this image:
This is not a bug but I feel that the size of the input boxes on the configuration page are unnecessarily large considering they will only have a few characters in:
Cheers,
Felix
Comment #20
dahousecat commentedComment #21
neetu morwani commented@dahousecat Space has been introduced between from and here. And size of the input boxes has also been reduced to considerable width.
@dipen Feature mentioned in -> https://drupal.org/node/2175071 has also been implemented. I am working on coming up with a suitable name for the module which justifies the new introduced feature as well.
The PAreview of the module gives no errors and warnings. http://pareview.sh/pareview/httpgitdrupalorgsandboxneetumorwani2086453git
Comment #22
neetu morwani commentedComment #23
neetu morwani commentedComment #24
neetu morwani commentedComment #25
neetu morwani commentedComment #26
neetu morwani commentedComment #27
neetu morwani commentedComment #28
neetu morwani commentedComment #29
neetu morwani commentedComment #30
klausiReview of the 7.x-1.x branch:
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:
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #31
neetu morwani commented@klausi
Thank you for reviewing. I have worked on all the issues mentioned by you but one.
6th point says -> imagesize_check_record(): do not call render() here, always return a nested render array without invoking render(), drupal_render() or theme(). Drupal will render it later for you. See https://drupal.org/node/930760
Can you please elaborate on this.
Configuration which was present on this page has been moved to the different page which only has configuration.
Page only has the list of all the images now and "Run Cron manually".
How do I render the form with a button without using render or drupal_render()?
Need your guidance on this.
Comment #32
neetu morwani commentedComment #33
neetu morwani commentedComment #34
neetu morwani commentedComment #35
neetu morwani commentedComment #36
neetu morwani commentedComment #37
neetu morwani commentedComment #38
partyka commentedReview of the 7.x-1.x branch
None found using drush dcs or pareview.sh
Code review here using this format:
(*) There is no configuration entry in the module *.info file, but I see configuration entries in hook_menu. (https://drupal.org/node/542202)
(*) Function imagesize_check_update_aspect_ratio_report() needs more inline comments. This appears to be the
meat of the module and better comments documenting the the function will help with bugs.
The following code where the results of a t() call are appended to the results of an l call should be changed into
one t() call. See https://api.drupal.org/api/drupal/includes%21common.inc/function/l/7 (Look for the directions
on how to use "t()" on this page.)
The following code, in imagesize_check_ratio_check_record() has several l() functions concatenated together. Perhaps using
one t() call here, with each link as a named placeholder would work better here. At a minimum, it would shorten the line
and make maintenance easier.
(*) Major finding
Minor finding
(*) Major finding
The starred items (*) are fairly big issues and warrant going back to Needs Review. The rest of the comments in the code walkthrough are recommendations.
Comment #39
mpdonadioForgive me if any of this has been done, I started the review over the weekend but wasn't able to finish it.
Automated Review
Nothing
Manual Review
The naked hook_menu that klusi mentioned has been fixed.
Adding a dependency on file_entity is going to limit the usage of this module. Not all sites that have images will be
using this module. And, installing file_entity just for some reports may intruduce some subtle differences in how files
get handled.
You don't need to explicitly uninstall the schema; drupal_uninstall_modules() does this for you.
Wildcard variable deletions should be avoided because of namespace conflicts.
Why does the query in imagesize_check_record have the node_access tag? Not seeing node being queried against.
Will this work with access module when styles end up in private://?
Rather than building markup directly, your page callbacks should build up render arrays.
Where is PASC being used? You have a hard dependency on it, but they you module detect it? If you are just implementing a PASC hook,
then you don't need a dependency (or a module detect it). If it is installed, then it will be picked up.
Where are you using File Entity? It seems that you only generate a link to the edit page? If so, you can remove
the hard dependency, and module detect to make this link.
You really need to make email a configurable setting.
May want to checkout format_size() for size info you output to the user.
You have some unused variables here and there. An IDE like Aptana, Eclipse, or PHPStorm can help find these.
You are sending the email to everyone in the administrator role? I have lots of clients where the admins have nothing to
do with content. Think of some better long term options. You can also do that query with one SELECT.
What if I don't want to do a full cron run to check image sizes? A user with your permission may also not have access
to run cron.
Consider moving the settings form to a .admin.inc file, and the page callbacks to a .pages.inc file, and then wire
them up in the hook_menu. This can help keep memory usage down.
This looks like it can be a handy module, but it needs some TLC. However, it looks like the blocking issues mentioned above have been addressed, and I am not seeing any other blockers. Marking RBTC.
Comment #40
klausimanual review:
Although there are so many open issues in your code that should be fixed they are not absolute critical application blockers, so ...
Thanks for your contribution, neetu morwani!
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.
Comment #42
yesct commentedchanging to use the more common tag, so the less common one can be deleted, so it does not show up in the auto complete and confuse people.