84% responsive-gallery-grid

Code Review | Responsive Gallery Grid

WordPress plugin Responsive Gallery Grid scored84%from 54 tests.

About plugin

  • Plugin page: responsive-galler...
  • Plugin version: 2.3.10
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 27, 2013
  • Latest release: Jan 17, 2023
  • Number of updates: 125
  • Update frequency: every 28.4 days
  • Top authors: Jules Colle (100%)

Code review

54 tests

User reviews

63 reviews

Install metrics

6,000+ active /178,563 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.56ms] Passed 4 tests

An overview of server-side resources used by Responsive Gallery Grid
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.25 ▲5.61
Dashboard /wp-admin3.32 ▲0.0246.69 ▼0.70
Posts /wp-admin/edit.php3.37 ▲0.0148.35 ▲1.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.80 ▼7.63
Media Library /wp-admin/upload.php3.24 ▲0.0133.16 ▲1.09

Server storage [IO: ▲0.19MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Responsive Gallery Grid
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.67 ▲0.321.77 ▲0.3138.99 ▲0.06
Dashboard /wp-admin2,210 ▲335.53 ▼0.0583.12 ▼1.6737.47 ▼4.88
Posts /wp-admin/edit.php2,121 ▲211.98 ▼0.0939.33 ▼3.1437.04 ▼3.89
Add New Post /wp-admin/post-new.php1,541 ▲1523.09 ▲0.08660.29 ▼0.8866.41 ▲14.52
Media Library /wp-admin/upload.php1,418 ▲184.20 ▲0.0194.59 ▼9.6640.99 ▼4.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant RGG_IS_PRO - assumed 'RGG_IS_PRO' (this will throw an Error in a future version of PHP) in wp-content/plugins/responsive-gallery-grid/rgg-options.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/responsive-gallery-grid/responsive-gallery-grid.php:38
    • > PHP Warning
      require_once(RGG_PLUGIN_DIR/pro/rgg_pro_options.php): failed to open stream: No such file or directory in wp-content/plugins/responsive-gallery-grid/rgg-options.php on line 4
    • > PHP Warning
      Use of undefined constant RGG_PLUGIN_DIR - assumed 'RGG_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/responsive-gallery-grid/rgg-options.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'RGG_PLUGIN_DIR/pro/rgg_pro_options.php' (include_path='.:/usr/share/php') in wp-content/plugins/responsive-gallery-grid/rgg-options.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/responsive-gallery-grid/gallery-shortcode.php:237

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: You can take inspiration from this readme.txt

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

"Responsive Gallery Grid" version 2.3.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 177 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
Everything looks great! No dangerous files found in this plugin2,422 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript63272081,148
PHP318652758
CSS77756502
SVG21014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants36
▷ Global constants36100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
lib/swipebox/img/icons.png0.71KB0.43KB▼ 39.64%