84% rg-responsive-gallery

Code Review | RG Responsive Gallery

WordPress plugin RG Responsive Gallery scored84%from 54 tests.

About plugin

  • Plugin page: rg-responsive-gal...
  • Plugin version: 1.6
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2015
  • Latest release: Apr 20, 2021
  • Number of updates: 18
  • Update frequency: every 108.9 days
  • Top authors: india-web-developer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,525 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.86ms] Passed 4 tests

A check of server-side resources used by RG Responsive Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0535.99 ▼7.83
Dashboard /wp-admin3.38 ▲0.0750.81 ▼0.67
Posts /wp-admin/edit.php3.50 ▲0.1458.25 ▲13.04
Add New Post /wp-admin/post-new.php5.96 ▲0.0882.53 ▼6.85
Media Library /wp-admin/upload.php3.28 ▲0.0536.12 ▼0.08
Settings /wp-admin/edit.php?post_type=rrg_gallery&page=rg-responsive-gallery-settings3.2836.90
Sliders /wp-admin/edit-tags.php?taxonomy=rrg_gallery_taxonomy&post_type=rrg_gallery3.3045.83
All Slides /wp-admin/edit.php?post_type=rrg_gallery3.3540.37
Add New slide /wp-admin/post-new.php?post_type=rrg_gallery3.3749.85

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

RG Responsive Gallery: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,976 ▲19014.41 ▼0.181.58 ▼0.3739.77 ▼5.10
Dashboard /wp-admin2,379 ▲2026.21 ▲0.63116.89 ▲14.2937.31 ▼7.40
Posts /wp-admin/edit.php2,307 ▲2073.38 ▲1.3957.47 ▲20.4336.25 ▼1.96
Add New Post /wp-admin/post-new.php1,567 ▲3223.23 ▲4.87658.25 ▲44.7136.59 ▼32.77
Media Library /wp-admin/upload.php1,447 ▲504.16 ▲0.0381.90 ▼15.5341.25 ▼2.25
Settings /wp-admin/edit.php?post_type=rrg_gallery&page=rg-responsive-gallery-settings1,3113.0440.1479.63
Sliders /wp-admin/edit-tags.php?taxonomy=rrg_gallery_taxonomy&post_type=rrg_gallery1,4953.2838.9929.60
All Slides /wp-admin/edit.php?post_type=rrg_gallery1,3233.3943.3626.69
Add New slide /wp-admin/post-new.php?post_type=rrg_gallery1,8303.6764.8933.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rg-responsive-gallery/lib/activate.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: image slider, image gallery, featured image sldier, responsive gallery, featured image...

rg-responsive-gallery/rg-responsive-gallery.php 92% from 13 tests

The main PHP file in "RG Responsive Gallery" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 165 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin764 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP476117699
CSS24544
JavaScript201221

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions3096.77%
▷ Anonymous functions13.23%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/controls.png2.74KB1.42KB▼ 48.29%
images/box-bg.png0.91KB0.09KB▼ 89.63%