83% advance-portfolio-grid

Code Review | Advance Portfolio Grid and Slider

WordPress plugin Advance Portfolio Grid and Slider scored 83% from 54 tests.

About plugin

  • Plugin page: advance-portfolio...
  • Plugin version: 1.06.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.2
  • WordPress version: 5.9.2
  • First release: Mar 8, 2015
  • Latest release: Mar 11, 2022
  • Number of updates: 78
  • Update frequency: every 32.8 days
  • Top authors: wpbean (100%)

Code review

54 tests

User reviews

30 reviews

Install metrics

1,000+ active / 58,892 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▼290.25ms] Passed 4 tests

This is a short check of server-side resources used by Advance Portfolio Grid and Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.3758.59 ▲5.83
Dashboard /wp-admin3.83 ▲0.4241.66 ▲7.11
Posts /wp-admin/edit.php4.05 ▲0.4144.82 ▲6.83
Add New Post /wp-admin/post-new.php7.43 ▲0.4695.53 ▼1,174.77
Media Library /wp-admin/upload.php3.75 ▲0.4625.46 ▲1.13
All Portfolios /wp-admin/edit.php?post_type=wpb_fp_portfolio3.8332.44
Portfolio Settings /wp-admin/edit.php?post_type=wpb_fp_portfolio&page=portfolio-settings3.7628.08
Add New /wp-admin/post-new.php?post_type=wpb_fp_portfolio7.4395.42
Portfolio Category /wp-admin/edit-tags.php?taxonomy=wpb_fp_portfolio_cat&post_type=wpb_fp_portfolio3.7831.20

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 4 new options
New WordPress options
wpb_fp_general
wpb_fp_slider
wpb_fp_advanced
wpb_fp_style

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advance Portfolio Grid and Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,193 ▲47118.03 ▲2.0711.08 ▲5.552.10 ▼0.17
Dashboard /wp-admin3,172 ▲3118.38 ▲2.22140.33 ▲2.58179.50 ▲18.98
Posts /wp-admin/edit.php2,999 ▲3055.55 ▲2.3084.31 ▲20.09186.72 ▲39.98
Add New Post /wp-admin/post-new.php1,720 ▲5915.88 ▲0.13395.81 ▼34.20167.72 ▲12.58
Media Library /wp-admin/upload.php1,787 ▲865.68 ▲0.18111.67 ▼20.13200.07 ▲18.89
All Portfolios /wp-admin/edit.php?post_type=wpb_fp_portfolio1,7275.4574.40150.28
Portfolio Settings /wp-admin/edit.php?post_type=wpb_fp_portfolio&page=portfolio-settings2,4785.15105.62190.48
Add New /wp-admin/post-new.php?post_type=wpb_fp_portfolio9,79920.22597.41173.47
Portfolio Category /wp-admin/edit-tags.php?taxonomy=wpb_fp_portfolio_cat&post_type=wpb_fp_portfolio1,9385.2275.50137.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 4 options in the database
    • wpb_fp_style
    • wpb_fp_general
    • wpb_fp_slider
    • wpb_fp_advanced

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

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

"Advance Portfolio Grid and Slider" version 1.06.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.5" instead of "4.0")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: The principal 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin4,579 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
CSS52521122,456
PHP124643931,803
PO File15555132
JavaScript42217125
SVG11363

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
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

PNG files should be compressed to save space and minimize bandwidth usage
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%