66% portfolio-gallery-by-ims

Code Review | Portfolio Gallery Plugin

WordPress plugin Portfolio Gallery Plugin scored 66% from 53 tests.

About plugin

  • Plugin page: portfolio-gallery...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 5.8.1
  • First release: Dec 13, 2017
  • Latest release: Apr 9, 2021
  • Number of updates: 30
  • Update frequency: every 40.5 days
  • Top authors: inmicrosolutions (86.67%)acewebx (16.67%)

Code review

53 tests

User reviews

1 review

Install metrics

80+ active / 2,230 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.22MB] [CPU: ▼270.13ms] Passed 4 tests

Analyzing server-side resources used by Portfolio Gallery Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.2342.00 ▲18.94
Dashboard /wp-admin3.17 ▲0.1245.39 ▲0.50
Posts /wp-admin/edit.php3.28 ▲0.1845.27 ▲5.46
Add New Post /wp-admin/post-new.php4.15 ▼1.2746.94 ▼1,084.02
Media Library /wp-admin/upload.php3.12 ▲0.1133.99 ▼2.46
Portfolio Tags /wp-admin/edit-tags.php?taxonomy=ims_portfoliotag&post_type=ims_portfolio3.1338.06
Add New /wp-admin/post-new.php?post_type=ims_portfolio3.0533.76
All Portfolios /wp-admin/edit.php?post_type=ims_portfolio3.3051.33

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 2 new options
New WordPress options
ims_portfolio_dummy_data
ims_portfoliotag_children

Browser metrics Passed 4 tests

Portfolio Gallery Plugin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,809 ▲20316.33 ▲0.8411.33 ▲1.3245.87 ▼2.57
Dashboard /wp-admin2,974 ▲1246.14 ▲0.27136.19 ▼3.86103.19 ▼0.37
Posts /wp-admin/edit.php2,750 ▲442.70 ▼0.1168.84 ▲1.6392.93 ▲1.05
Add New Post /wp-admin/post-new.php1,681 ▲20217.41 ▲0.31358.01 ▲9.92111.19 ▲6.60
Media Library /wp-admin/upload.php1,816 ▲415.03 ▲0.05146.43 ▲0.29115.67 ▼2.63
Portfolio Tags /wp-admin/edit-tags.php?taxonomy=ims_portfoliotag&post_type=ims_portfolio1,9362.5162.0179.61
Add New /wp-admin/post-new.php?post_type=ims_portfolio3,2108.93215.27143.20
All Portfolios /wp-admin/edit.php?post_type=ims_portfolio2,5412.7069.5683.85

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 2 options in the database
    • ims_portfolio_dummy_data
    • ims_portfoliotag_children

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=ims_portfolio
    • > Notice in wp-content/plugins/portfolio-gallery-by-ims/admin/class-ims-portfolio-admin.php+148
    Undefined index: post_type
    • > GET request to /wp-admin/post-new.php?post_type=ims_portfolio
    • > Notice in wp-content/plugins/portfolio-gallery-by-ims/admin/class-ims-portfolio-admin.php+155
    Undefined index: ims_button_name
    • > GET request to /wp-admin/post-new.php?post_type=ims_portfolio
    • > Notice in wp-content/plugins/portfolio-gallery-by-ims/admin/class-ims-portfolio-admin.php+156
    Undefined index: ims_button_url
    • > GET request to /wp-admin/post-new.php?post_type=ims_portfolio
    • > Notice in wp-content/plugins/portfolio-gallery-by-ims/admin/class-ims-portfolio-admin.php+157
    Undefined index: ims_thumb_img
    • > GET request to /wp-admin/post-new.php?post_type=ims_portfolio
    • > Notice in wp-content/plugins/portfolio-gallery-by-ims/admin/class-ims-portfolio-admin.php+158
    Undefined index: ims_large_img

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/portfolio-gallery-by-ims/public/partials/ims-portfolio-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/portfolio-gallery-by-ims/admin/partials/ims-portfolio-admin-display.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=ims_portfolio
    • > Network (severe)
    wp-content/plugins/portfolio-gallery-by-ims/admin/css/plugin-name-admin.css?ver=1.0.3 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Screenshots: Add descriptions for screenshots #2, #3, #4 in portfolio-gallery-by-ims/assets to your readme.txt
  • Screenshots: These screenshots require images: #6 (**All portfolio list** - See all Portfolio list under menu of Portfolio.), #7 (**Portfolio demo** - Default portfolio demo for you.), #8 (**Gallery detailed view** - Gallary with portfolio and its details view.)
You can look at the official readme.txt

portfolio-gallery-by-ims/portfolio-gallery-by-ims.php 85% from 13 tests

This is the main PHP file of "Portfolio Gallery Plugin" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 237 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,847 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript74783621,226
PHP12184538562
CSS310559

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.43
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin