83% gallery-rb

Code Review | Gallery RB

WordPress plugin Gallery RB scored83%from 54 tests.

About plugin

  • Plugin page: gallery-rb
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-6.2
  • WordPress version: 6.3.1
  • First release: Jul 2, 2017
  • Latest release: May 19, 2023
  • Number of updates: 21
  • Update frequency: every 102.3 days
  • Top authors: rbplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,586 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Gallery RB
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.76 ▼10.96
Dashboard /wp-admin3.32 ▲0.0146.18 ▼4.11
Posts /wp-admin/edit.php3.37 ▲0.0149.44 ▲0.18
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.79 ▼13.60
Media Library /wp-admin/upload.php3.24 ▲0.0134.32 ▼1.57
RB Gallery /wp-admin/options-general.php?page=rb_gallery_settings3.2632.04

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gallery RB
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲4213.25 ▼0.844.35 ▲2.0743.35 ▼10.19
Dashboard /wp-admin2,234 ▲314.86 ▼0.99107.11 ▼10.2837.85 ▼6.66
Posts /wp-admin/edit.php2,116 ▲162.05 ▲0.0543.69 ▲7.3637.84 ▲3.60
Add New Post /wp-admin/post-new.php1,538 ▲717.54 ▼5.64662.49 ▼8.0747.82 ▼6.95
Media Library /wp-admin/upload.php1,410 ▲74.17 ▼0.12101.23 ▼3.6246.53 ▲1.12
RB Gallery /wp-admin/options-general.php?page=rb_gallery_settings1,0361.8425.8024.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rb_gallery_settings
    • > Notice in wp-content/plugins/gallery-rb/options.php+59
    Undefined index: enable
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rb_gallery_settings
    • > Notice in wp-content/plugins/gallery-rb/options.php+74
    Undefined index: cols
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rb_gallery_settings
    • > Notice in wp-content/plugins/gallery-rb/options.php+112
    Undefined index: size

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Gallery plugin options), #2 (Gallery plugin view (4 cols))
You can take inspiration from this readme.txt

gallery-rb/gallery-rb.php 92% from 13 tests

"Gallery RB" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected179 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35419179

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods770.00%
▷ Protected methods00.00%
▷ Private methods330.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.61MB with 0.38MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png14.83KB5.84KB▼ 60.62%
screenshot-3.png273.28KB63.69KB▼ 76.69%
screenshot-4.png331.03KB74.19KB▼ 77.59%
screenshot-2.png3.60KB2.30KB▼ 36.08%