57% gs-behance-portfolio

Code Review | WordPress Behance Plugin - Make a Portfolio, Feed, Gallery, Slider and More

WordPress plugin WordPress Behance Plugin - Make a Portfolio, Feed, Gallery, Slider and More scored57%from 54 tests.

About plugin

  • Plugin page: gs-behance-portfolio
  • Plugin version: 3.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.4
  • WordPress version: 6.3.1
  • First release: Aug 16, 2016
  • Latest release: Nov 29, 2023
  • Number of updates: 88
  • Update frequency: every 30.2 days
  • Top authors: samdani (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /15,835 total downloads

Benchmarks

Plugin footprint 47% 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: ▲5.55MB] [CPU: ▲31.72ms] 50% from 4 tests

Server-side resources used by WordPress Behance Plugin - Make a Portfolio, Feed, Gallery, Slider and More
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 666.94ms on /wp-admin/admin.php?page=gs-behance-plugins-premium)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.55MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.22 ▲5.7569.21 ▲32.91
Dashboard /wp-admin9.24 ▲5.8994.02 ▲28.94
Posts /wp-admin/edit.php9.24 ▲5.8877.13 ▲27.98
Add New Post /wp-admin/post-new.php10.58 ▲4.70136.03 ▲37.04
Media Library /wp-admin/upload.php9.24 ▲6.0176.65 ▲42.27
GS Plugins Lite /wp-admin/admin.php?page=gs-behance-plugins-lite9.24705.29
GS Plugins Pro /wp-admin/admin.php?page=gs-behance-plugins-premium9.24666.94
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.2461.39

Server storage [IO: ▲5.11MB] [DB: ▲0.05MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 252 new files
Database: 2 new tables, 13 new options
New tables
wp_gsbeh_shortcodes
wp_gsbehance
New WordPress options
gs_behance_data_table_created
db_upgraded
fs_accounts
gsbeh_plugin_version
theysaidso_admin_options
fs_active_plugins
upgraded_to_3.0.6
widget_recent-comments
widget_theysaidso_widget
gs_behance_shortcode_table_version
...

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Behance Plugin - Make a Portfolio, Feed, Gallery, Slider and More
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲19313.50 ▼1.219.40 ▲7.6527.79 ▼10.66
Dashboard /wp-admin2,240 ▲635.49 ▼0.1185.15 ▼11.5680.06 ▲35.26
Posts /wp-admin/edit.php2,149 ▲491.95 ▼0.0139.29 ▼0.9337.24 ▲2.25
Add New Post /wp-admin/post-new.php1,747 ▲22124.61 ▲0.87643.97 ▼27.2636.53 ▼23.64
Media Library /wp-admin/upload.php1,442 ▲454.16 ▼0.0495.26 ▼6.9662.82 ▲19.14
GS Plugins Lite /wp-admin/admin.php?page=gs-behance-plugins-lite2,5472.0034.62129.40
GS Plugins Pro /wp-admin/admin.php?page=gs-behance-plugins-premium2,1522.0535.5370.09
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1101.6627.3127.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/gs-behance-portfolio/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie tables detected upon uninstall: 2 tables
    • wp_gsbehance
    • wp_gsbeh_shortcodes
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • gs_behance_data_table_created
    • upgraded_to_3.0.6
    • fs_active_plugins
    • fs_debug_mode
    • db_upgraded
    • gs_behance_shortcode_table_version
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gs-behance-portfolio/includes/integrations/beaver/includes/frontend.php
  • 37× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function GSBEH\\do_action() in wp-content/plugins/gs-behance-portfolio/templates/gs_behance_stats_style_1.php:89
    • > PHP Fatal error
      Uncaught Error: Call to undefined function GSBEH\\plugin() in wp-content/plugins/gs-behance-portfolio/templates/gs_behance_structure_six_profile.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function GSBEH\\plugin() in wp-content/plugins/gs-behance-portfolio/templates/gs_behance_structure_seven_filter.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gs-behance-portfolio/includes/shortcode-builder/page.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function GSBEH\\do_action() in wp-content/plugins/gs-behance-portfolio/templates/gs_behance_popup_style_1_and_2.php:129
    • > PHP Notice
      Undefined variable: gs_behance_shots in wp-content/plugins/gs-behance-portfolio/templates/gs_behance_stats_style_1.php on line 10
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/gs-behance-portfolio/templates/gs_behance_hover_style_4.php on line 8
    • > PHP Warning
      Use of undefined constant GSBEH_PLUGIN_URI - assumed 'GSBEH_PLUGIN_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/gs-behance-portfolio/includes/shortcode-builder/page.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function GSBEH\\do_action() in wp-content/plugins/gs-behance-portfolio/templates/gs_behance_structure_slider_1.php:59
    • > PHP Notice
      Undefined variable: gs_behance_shots in wp-content/plugins/gs-behance-portfolio/templates/gs_behance_hover_style_4.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
5 plugin tags: behance gallery plugin, behance wordpress, wordpress behance plugin, behance, behance plugin

gs-behance-portfolio/gs-behance-portfolio-lite.php 77% from 13 tests

"WordPress Behance Plugin - Make a Portfolio, Feed, Gallery, Slider and More" version 3.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 507 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gs-behance-portfolio.php" instead of "gs-behance-portfolio-lite.php")
  • 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 97% from 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
Everything looks great! No dangerous files found in this plugin38,461 lines of code in 199 files:
LanguageFilesBlank linesComment linesLines of code
PHP1599,45018,12637,026
CSS234811602
Sass11016521
JavaScript147265310
SVG2002

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity63.25
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes76
▷ Abstract classes33.95%
▷ Concrete classes7396.05%
▷ Final classes34.11%
Methods1,512
▷ Static methods21514.22%
▷ Public methods1,09472.35%
▷ Protected methods312.05%
▷ Private methods38725.60%
Functions115
▷ Named functions11095.65%
▷ Anonymous functions54.35%
Constants149
▷ Global constants10268.46%
▷ Class constants4731.54%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/wordpress-behance-plugin.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/img/icon-128x128.png29.52KB10.00KB▼ 66.10%
assets/img/icon.png1.23KB1.28KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%