77% gs-envato-portfolio

Code Review | GS Portfolio for Envato

WordPress plugin GS Portfolio for Envato scored77%from 54 tests.

About plugin

  • Plugin page: gs-envato-portfolio
  • Plugin version: 1.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Mar 14, 2017
  • Latest release: Aug 30, 2023
  • Number of updates: 48
  • Update frequency: every 49.1 days
  • Top authors: samdani (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

800+ active /24,545 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.51MB] [CPU: ▲0.68ms] 75% from 4 tests

Analyzing server-side resources used by GS Portfolio for Envato
Please fix the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 625.28ms on /wp-admin/admin.php?page=gs-envato-plugins-premium)
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4846.69 ▲7.21
Dashboard /wp-admin3.87 ▲0.5761.02 ▲3.86
Posts /wp-admin/edit.php3.92 ▲0.5655.84 ▲8.31
Add New Post /wp-admin/post-new.php6.38 ▲0.5091.42 ▼16.67
Media Library /wp-admin/upload.php3.71 ▲0.4845.58 ▲9.55
Envato Settings /wp-admin/admin.php?page=envato-settings3.6941.85
GS Plugins Lite /wp-admin/admin.php?page=gs-envato-plugins-lite3.97662.80
Help & Usage /wp-admin/admin.php?page=gs-envato-plugins-help3.7040.55
GS Plugins Pro /wp-admin/admin.php?page=gs-envato-plugins-premium3.86625.28

Server storage [IO: ▲1.35MB] [DB: ▲0.04MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
gs_envato_author_settings
can_compress_scripts
db_upgraded
widget_recent-comments
gs_envato_settings
widget_theysaidso_widget
theysaidso_admin_options
gs_envato_style_settings

Browser metrics Passed 4 tests

An overview of browser requirements for GS Portfolio for Envato
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,048 ▲30214.71 ▲0.742.23 ▲0.4846.03 ▲7.65
Dashboard /wp-admin2,445 ▲2706.50 ▲0.79116.17 ▲12.5987.17 ▲45.83
Posts /wp-admin/edit.php2,370 ▲2733.84 ▲1.8452.62 ▲19.2868.50 ▲33.23
Add New Post /wp-admin/post-new.php1,692 ▲14722.77 ▼0.28660.42 ▼32.42181.40 ▲128.94
Media Library /wp-admin/upload.php1,504 ▲1074.72 ▲0.51115.51 ▲15.8688.94 ▲45.53
Envato Settings /wp-admin/admin.php?page=envato-settings1,7696.08128.1561.04
GS Plugins Lite /wp-admin/admin.php?page=gs-envato-plugins-lite2,7433.4444.26110.13
Help & Usage /wp-admin/admin.php?page=gs-envato-plugins-help1,1473.2945.4347.37
GS Plugins Pro /wp-admin/admin.php?page=gs-envato-plugins-premium2,4083.4348.5958.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.04MB] 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
  • This plugin does not fully uninstall, leaving 9 options in the database
    • gs_envato_author_settings
    • widget_theysaidso_widget
    • gs_envato_style_settings
    • gs_envato_settings
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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 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
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'GS_envato_WeDevs_Settings_API' not found in wp-content/plugins/gs-envato-portfolio/gs-envato-assets/admin/gs_envato_options_config.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gs-envato-portfolio/gs-envato-assets/gs-common-pages/gs-envato-common-pages.php:3
    • > PHP Notice
      Undefined variable: output in wp-content/plugins/gs-envato-portfolio/gs-envato-assets/includes/templates/gs_envato_theme1_grid.php on line 3
    • > PHP Notice
      Undefined variable: count in wp-content/plugins/gs-envato-portfolio/gs-envato-assets/includes/templates/gs_envato_theme1_grid.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gs-envato-portfolio/gs-envato-assets/gs-envato-scripts.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/gs-envato-portfolio/gs-envato-assets/includes/gs-envato-item-shortcode.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/gs-envato-portfolio/gs_envato_market.php:22

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=envato-settings
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=envato-settings
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
The official readme.txt might help

gs-envato-portfolio/gs_envato_market.php 77% from 13 tests

"GS Portfolio for Envato" version 1.4.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("gs-envato-portfolio.php" instead of "gs_envato_market.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 302 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected5,930 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP127248842,843
CSS796321,789
SVG200566
Sass11016521
JavaScript15165190
JSON10021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity37.57
▷ Minimum class complexity3.00
▷ Maximum class complexity70.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods141
▷ Static methods10.71%
▷ Public methods10775.89%
▷ Protected methods64.26%
▷ Private methods2819.86%
Functions24
▷ Named functions2395.83%
▷ Anonymous functions14.17%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
gs-envato-assets/assets/img/icon-128x128.png2.74KB1.64KB▼ 40.27%