78% photo-gallery-rb

Code Review | Photo Gallery RB

WordPress plugin Photo Gallery RB scored 78% from 54 tests.

About plugin

  • Plugin page: photo-gallery-rb
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.2
  • WordPress version: 6.3.1
  • First release: Jun 10, 2017
  • Latest release: May 19, 2023
  • Number of updates: 18
  • Update frequency: every 120.5 days
  • Top authors: rbplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 2,183 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.97ms] Passed 4 tests

A check of server-side resources used by Photo Gallery RB
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.03 ▼1.00
Dashboard /wp-admin3.37 ▲0.0750.11 ▲0.83
Posts /wp-admin/edit.php3.48 ▲0.1344.13 ▲1.22
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.83 ▼8.91
Media Library /wp-admin/upload.php3.29 ▲0.0635.00 ▲1.80
Rb Photo Gallery /wp-admin/options-general.php?page=rb_photo_gallery_settings3.2530.11

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Photo Gallery RB
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.20 ▼1.171.73 ▼0.0245.43 ▲3.57
Dashboard /wp-admin2,210 ▲224.86 ▼0.08112.58 ▲9.5144.59 ▲2.41
Posts /wp-admin/edit.php2,093 ▲72.04 ▲0.0032.97 ▼3.1234.64 ▲2.57
Add New Post /wp-admin/post-new.php1,536 ▲223.38 ▲0.22621.92 ▼56.9450.71 ▼3.08
Media Library /wp-admin/upload.php1,392 ▲44.20 ▲0.0096.62 ▼5.6941.51 ▼5.92
Rb Photo Gallery /wp-admin/options-general.php?page=rb_photo_gallery_settings7992.0625.2123.98

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_photo_gallery_rb_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rb_photo_gallery_settings
    • > Notice in wp-content/plugins/photo-gallery-rb/options.php+37
    Undefined index: enable_everywhere

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/photo-gallery-rb/widget.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Photo Gallery plugin options) image required
You can take inspiration from this readme.txt

photo-gallery-rb/photo-gallery-rb.php Passed 13 tests

The main PHP script in "Photo Gallery RB" version 1.0.10 is automatically included on every request by WordPress
124 characters long description:
Photo gallery plugin with wide range of configuration option. Simple image management tools. Customizable thumbnails layout.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin52,148 lines of code in 246 files:
LanguageFilesBlank linesComment linesLines of code
CSS933,0854,52725,951
JavaScript501,8991,03222,246
PO File988828823,714
PHP46132236
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity9.50
▷ Minimum class complexity4.00
▷ Maximum class complexity15.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods1381.25%
▷ Protected methods00.00%
▷ Private methods318.75%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/icons.png0.71KB0.43KB▼ 39.64%
screenshot-1.png9.57KB4.84KB▼ 49.43%