84% advance-portfolio-grid

Code Review | Advance Portfolio Grid, Slider and Gallery - Showcase Projects, Images and Videos

WordPress plugin Advance Portfolio Grid, Slider and Gallery - Showcase Projects, Images and Videos scored 84% from 54 tests.

About plugin

  • Plugin page: advance-portfolio...
  • Plugin version: 1.07.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 8, 2015
  • Latest release: Aug 29, 2023
  • Number of updates: 94
  • Update frequency: every 32.9 days
  • Top authors: wpbean (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

1,000+ active / 65,743 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▲5.26ms] Passed 4 tests

Server-side resources used by Advance Portfolio Grid, Slider and Gallery - Showcase Projects, Images and Videos
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.75 ▼1.61
Dashboard /wp-admin3.53 ▲0.2360.78 ▲8.02
Posts /wp-admin/edit.php3.58 ▲0.2355.57 ▲9.41
Add New Post /wp-admin/post-new.php6.13 ▲0.25105.31 ▲14.42
Media Library /wp-admin/upload.php3.37 ▲0.1442.68 ▲5.22
Add New /wp-admin/post-new.php?post_type=wpb_fp_portfolio6.1282.55
Portfolio Settings /wp-admin/edit.php?post_type=wpb_fp_portfolio&page=portfolio-settings3.3733.34
Portfolio Category /wp-admin/edit-tags.php?taxonomy=wpb_fp_portfolio_cat&post_type=wpb_fp_portfolio3.5237.19
All Portfolios /wp-admin/edit.php?post_type=wpb_fp_portfolio3.4436.01

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 10 new options
New WordPress options
wpb_fp_style
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
wpb_fp_advanced
widget_theysaidso_widget
wpb_fp_slider
wpb_fp_general
widget_recent-posts

Browser metrics Passed 4 tests

Advance Portfolio Grid, Slider and Gallery - Showcase Projects, Images and Videos: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,126 ▲39115.62 ▲1.338.60 ▲6.5937.86 ▼10.86
Dashboard /wp-admin2,403 ▲2186.63 ▲0.76136.20 ▲10.9045.67 ▲0.38
Posts /wp-admin/edit.php2,311 ▲2253.67 ▲1.6557.69 ▲22.0239.96 ▲2.65
Add New Post /wp-admin/post-new.php1,724 ▲21022.85 ▲5.41572.53 ▼86.8830.74 ▼24.00
Media Library /wp-admin/upload.php1,445 ▲544.36 ▲0.1285.63 ▼17.5443.78 ▼3.89
Add New /wp-admin/post-new.php?post_type=wpb_fp_portfolio6,54820.65840.0641.53
Portfolio Settings /wp-admin/edit.php?post_type=wpb_fp_portfolio&page=portfolio-settings1,8653.4877.0039.53
Portfolio Category /wp-admin/edit-tags.php?taxonomy=wpb_fp_portfolio_cat&post_type=wpb_fp_portfolio1,4883.4650.9435.04
All Portfolios /wp-admin/edit.php?post_type=wpb_fp_portfolio1,3233.4754.6535.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_recent-comments
    • db_upgraded
    • wpb_fp_advanced
    • wpb_fp_slider
    • theysaidso_admin_options
    • can_compress_scripts
    • wpb_fp_style
    • wpb_fp_general
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advance-portfolio-grid/inc/wpb_fp_elementor.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advance-portfolio-grid/inc/wpb_fp_metabox.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: gallery, filterable portfolio, portfolio gallery, portfolio grid, wordpress portfolio plugin...

advance-portfolio-grid/main.php 85% from 13 tests

The primary PHP file in "Advance Portfolio Grid, Slider and Gallery - Showcase Projects, Images and Videos" version 1.07.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advance-portfolio-grid.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin4,564 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
CSS52501122,441
PHP124643901,803
PO File15555132
JavaScript42217125
SVG11363

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity24.20
▷ Minimum class complexity3.00
▷ Maximum class complexity69.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods55
▷ Static methods23.64%
▷ Public methods5192.73%
▷ Protected methods23.64%
▷ Private methods23.64%
Functions33
▷ Named functions3296.97%
▷ Anonymous functions13.03%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/check-icon.png2.13KB2.13KB0.00%