83% rps-image-gallery

Code Review | RPS Image Gallery

WordPress plugin RPS Image Gallery scored83%from 54 tests.

About plugin

  • Plugin page: rps-image-gallery
  • Plugin version: 2.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.0
  • WordPress version: 6.3.1
  • First release: Feb 15, 2012
  • Latest release: Jun 10, 2022
  • Number of updates: 111
  • Update frequency: every 34.0 days
  • Top authors: redpixelstudios (98.2%)Red Pixel Studios (2.7%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /118,495 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.55MB] [CPU: ▲2.13ms] Passed 4 tests

Server-side resources used by RPS Image Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5842.47 ▲2.43
Dashboard /wp-admin3.88 ▲0.5853.10 ▼0.71
Posts /wp-admin/edit.php3.93 ▲0.5748.01 ▲1.87
Add New Post /wp-admin/post-new.php6.41 ▲0.5295.49 ▲13.34
Media Library /wp-admin/upload.php3.75 ▲0.5238.73 ▲4.91

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 101 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
_rps_image_gallery_version
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for RPS Image Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.381.86 ▲0.1042.99 ▼2.11
Dashboard /wp-admin2,206 ▲185.85 ▼0.00112.75 ▼3.6344.99 ▼0.15
Posts /wp-admin/edit.php2,086 ▼31.98 ▼0.0333.55 ▼3.4235.01 ▲1.49
Add New Post /wp-admin/post-new.php1,542 ▲2818.29 ▲0.80622.82 ▼69.2066.35 ▲9.52
Media Library /wp-admin/upload.php1,385 ▼64.19 ▲0.0199.37 ▼3.4943.96 ▼3.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • _rps_image_gallery_version
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'rpsfancybox\\display\\SlideshowView' not found in wp-content/plugins/rps-image-gallery/dependencies/rpsfancybox/display/Slideshow2View.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'rpsfancybox\\display\\SlideshowView' not found in wp-content/plugins/rps-image-gallery/dependencies/rpsfancybox/display/Slideshow1View.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Tags: Too many tags (65 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots need descriptions #2, #3, #4 in rps-image-gallery/assets to your readme.txt
You can take inspiration from this readme.txt

rps-image-gallery/rps-image-gallery.php Passed 13 tests

The primary PHP file in "RPS Image Gallery" version 2.2.7 is used by WordPress to initiate all plugin functionality
76 characters long description:
A responsive image gallery with slideshow and advanced linking capabilities.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin8,834 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP301,0771,9433,949
JavaScript161,1334833,594
CSS815452918
Sass31288373

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity16.96
▷ Minimum class complexity1.00
▷ Maximum class complexity181.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes28
▷ Abstract classes310.71%
▷ Concrete classes2589.29%
▷ Final classes1352.00%
Methods307
▷ Static methods165.21%
▷ Public methods26185.02%
▷ Protected methods185.86%
▷ Private methods289.12%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants38
▷ Global constants00.00%
▷ Class constants38100.00%
▷ Public constants38100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
34 PNG files occupy 2.33MB with 0.69MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png21.41KB9.56KB▼ 55.35%
assets/banner-772x250.png61.57KB26.70KB▼ 56.63%
dependencies/fancybox/fancy_shadow_s.png0.11KB0.19KB0.00%
dependencies/rpsfancybox/fancybox2/fancybox_sprite.png2.72KB2.01KB▼ 26.14%
dependencies/fancybox2/fancybox_sprite@2x.png6.40KB5.76KB▼ 9.96%