89% awesome-responsive-photo-gallery

Code Review | Image Gallery - Responsive Photo Gallery

WordPress plugin Image Gallery - Responsive Photo Gallery scored89%from 54 tests.

About plugin

  • Plugin page: awesome-responsiv...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0.1
  • WordPress version: 6.3.1
  • First release: Mar 8, 2018
  • Latest release: Jul 24, 2022
  • Number of updates: 42
  • Update frequency: every 38.1 days
  • Top authors: moviehour (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,139 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼9.77ms] Passed 4 tests

A check of server-side resources used by Image Gallery - Responsive Photo Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0431.24 ▼8.67
Dashboard /wp-admin3.48 ▲0.1846.71 ▼3.88
Posts /wp-admin/edit.php3.55 ▲0.1947.51 ▼1.06
Add New Post /wp-admin/post-new.php6.10 ▲0.2274.37 ▼25.45
Media Library /wp-admin/upload.php3.33 ▲0.1035.41 ▲0.63
All Galleries /wp-admin/admin.php?page=arpg-settings3.3338.32
Awesome Gallery /wp-admin/admin.php?page=awesome-responsive-photo-gallery/inc/arpg-admin.php3.3333.08

Server storage [IO: ▲2.66MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 60 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Image Gallery - Responsive Photo Gallery: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,985 ▲19914.77 ▲0.171.63 ▼0.1039.19 ▼0.46
Dashboard /wp-admin2,394 ▲2206.43 ▲0.86109.97 ▲26.4740.21 ▼5.29
Posts /wp-admin/edit.php2,320 ▲2203.60 ▲1.6653.06 ▲18.4432.26 ▼4.64
Add New Post /wp-admin/post-new.php1,575 ▲4921.10 ▼2.07664.18 ▼3.5930.45 ▼27.96
Media Library /wp-admin/upload.php1,454 ▲544.47 ▲0.3294.67 ▼4.2548.18 ▲2.36
All Galleries /wp-admin/admin.php?page=arpg-settings1,1033.2948.9636.67
Awesome Gallery /wp-admin/admin.php?page=awesome-responsive-photo-gallery/inc/arpg-admin.php1,1033.3239.0931.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Thumbnail View), #2 (Lightbox View for lightGallery), #3 (Lightbox View for Lightcase), #4 (Lightbox View for jGallery), #5 (Gallery Settings in Edit Gallery), #6 (Gallery Lists), #7 (Gallery Settings)
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

awesome-responsive-photo-gallery/awesome-gallery.php 77% from 13 tests

The entry point to "Image Gallery - Responsive Photo Gallery" version 1.0.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("awesome-responsive-photo-gallery.php" instead of "awesome-gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin5,446 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
SVG40123,026
PHP101132231,642
CSS6967482
PO File1118167290
JavaScript60236

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-7.png10.97KB10.08KB▼ 8.14%
screenshot-6.png5.16KB4.34KB▼ 15.84%
assets/images/arpg-buttons.png5.83KB2.83KB▼ 51.40%
assets/images/zoom.png1.63KB0.96KB▼ 41.07%
assets/images/vimeo-play.png5.30KB1.56KB▼ 70.65%