10% rocket-responsive-gallery

Code Review | WordPress Gallery Plugin

WordPress plugin WordPress Gallery Plugin scored 10% from 54 tests.

About plugin

  • Plugin page: rocket-responsive...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Feb 14, 2014
  • Latest release: Jan 17, 2016
  • Number of updates: 23
  • Update frequency: every 30.5 days
  • Top authors: Muneeb (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

40+ active / 16,303 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/rocket-responsive-gallery/wp-gallery.php+20
    require(wp-content/plugins/rocket-responsive-gallery/includes/functions.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.31ms] Passed 4 tests

Analyzing server-side resources used by WordPress Gallery Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.09 ▲1.37
Dashboard /wp-admin3.31 ▲0.0050.31 ▲1.10
Posts /wp-admin/edit.php3.36 ▲0.0044.26 ▼6.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.73 ▼6.30
Media Library /wp-admin/upload.php3.23 ▲0.0033.17 ▼1.20

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Gallery Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.30 ▼0.991.77 ▼0.3544.39 ▼7.11
Dashboard /wp-admin2,209 ▲215.85 ▲0.03102.48 ▼6.6942.75 ▼1.41
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0233.46 ▼10.0034.45 ▼0.91
Add New Post /wp-admin/post-new.php1,533 ▼923.29 ▲5.06664.33 ▲47.9656.04 ▼10.60
Media Library /wp-admin/upload.php1,388 ▲64.22 ▲0.0394.46 ▼0.4141.03 ▼2.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/rocket-responsive-gallery/views/shortcode_meta_box.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/rocket-responsive-gallery/views/intro_box.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/rocket-responsive-gallery/views/custom_publish_meta_box.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/rocket-responsive-gallery/views/wpgp_skins/default/gallery.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rocket-responsive-gallery/config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/rocket-responsive-gallery/views/banner_meta_box.php:2
    • > PHP Notice
      Undefined variable: post_status in wp-content/plugins/rocket-responsive-gallery/views/custom_publish_meta_box.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/rocket-responsive-gallery/views/slides_meta_box.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/rocket-responsive-gallery/views/options_meta_box.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rocket-responsive-gallery/wp-gallery.php:18
    • > PHP Notice
      Undefined variable: post_status in wp-content/plugins/rocket-responsive-gallery/views/custom_publish_meta_box.php on line 11

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 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (47 tag instead of maximum 10)
You can look at the official readme.txt

rocket-responsive-gallery/wp-gallery.php 92% from 13 tests

The main PHP file in "WordPress Gallery Plugin" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rocket-responsive-gallery.php" instead of "wp-gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,698 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS213711864
PHP1114717576
JavaScript21252258

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.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
3 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pro-banner.png92.13KB43.84KB▼ 52.42%
images/sprite.png6.40KB3.00KB▼ 53.07%
images/wpgp-html-feature.png10.60KB3.88KB▼ 63.39%