73% responsive-portfolio-gallery

Code Review | Responsive Portfolio Gallery

WordPress plugin Responsive Portfolio Gallery scored73%from 54 tests.

About plugin

  • Plugin page: responsive-portfo...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 6.3.1
  • First release: Mar 19, 2015
  • Latest release: Dec 8, 2018
  • Number of updates: 20
  • Update frequency: every 68.1 days
  • Top authors: LABCAT (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /7,445 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.69ms] Passed 4 tests

An overview of server-side resources used by Responsive Portfolio Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1550.59 ▲9.14
Dashboard /wp-admin3.45 ▲0.1054.14 ▼8.42
Posts /wp-admin/edit.php3.54 ▲0.1953.91 ▲3.98
Add New Post /wp-admin/post-new.php6.03 ▲0.1590.00 ▼11.47
Media Library /wp-admin/upload.php3.37 ▲0.1443.62 ▲9.27
Portfolio Items /wp-admin/edit.php?post_type=portfolio-item3.4044.39
Add New /wp-admin/post-new.php?post_type=portfolio-item3.5060.31
Categories /wp-admin/edit-tags.php?taxonomy=portfolio-category&post_type=portfolio-item3.3740.44

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Responsive Portfolio Gallery: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,993 ▲23213.86 ▼0.7710.52 ▲8.9941.87 ▲0.07
Dashboard /wp-admin2,226 ▲465.58 ▼0.0797.98 ▲5.8342.80 ▼3.41
Posts /wp-admin/edit.php2,131 ▲342.01 ▲0.0339.89 ▼0.3935.78 ▼3.24
Add New Post /wp-admin/post-new.php1,552 ▲2423.79 ▲0.46604.45 ▲1.4252.49 ▼9.32
Media Library /wp-admin/upload.php1,434 ▲374.15 ▼0.0798.22 ▼3.5843.82 ▼0.78
Portfolio Items /wp-admin/edit.php?post_type=portfolio-item1,1031.9432.3928.60
Add New /wp-admin/post-new.php?post_type=portfolio-item2,4677.61173.5664.84
Categories /wp-admin/edit-tags.php?taxonomy=portfolio-category&post_type=portfolio-item1,3052.1230.4833.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/responsive-portfolio-gallery/responsive-portfolio-gallery.php+35
    Non-static method ResponsivePortfolioGallery::unregister_post_type() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 take a closer look at the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Two_Column_Portfolio_Shortcode' not found in wp-content/plugins/responsive-portfolio-gallery/shortcodes/two-column-portfolio.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Three_Column_Portfolio_Shortcode' not found in wp-content/plugins/responsive-portfolio-gallery/shortcodes/three-column-portfolio.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/responsive-portfolio-gallery/templates/single-portfolio-item.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Four_Column_Portfolio_Shortcode' not found in wp-content/plugins/responsive-portfolio-gallery/shortcodes/four-column-portfolio.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/responsive-portfolio-gallery/responsive-portfolio-gallery.php:62

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected


Plugin configuration 90% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Full Screen Frontend Gallery), #2 (Mobile Devices Frontend Gallery), #3 (Single Portfolio Item Frontend), #4 (Adding A New Category), #5 (Adding A New Portfolio Item), #6 (Setting The Featured Image For A Portfolio Item), #7 (Adding The Gallery Shortcode To A Page)
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

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

The primary PHP file in "Responsive Portfolio Gallery" version 1.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected821 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code

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.33
Average class complexity9.17
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
▷ Static methods29.09%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 0.71MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/list-view-32.png2.20KB1.12KB▼ 48.98%
assets/images/hybrid-grid-view-64.png3.26KB2.10KB▼ 35.61%
screenshot-6.png33.80KB18.24KB▼ 46.03%
screenshot-2.png108.16KB30.50KB▼ 71.80%
assets/images/grid-view-32.png1.90KB0.89KB▼ 53.30%