77% gs-dribbble-portfolio

Code Review | GS Shots for Dribbble

WordPress plugin GS Shots for Dribbble scored77%from 54 tests.

About plugin

  • Plugin page: gs-dribbble-portf...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Aug 1, 2016
  • Latest release: Aug 29, 2023
  • Number of updates: 44
  • Update frequency: every 58.7 days
  • Top authors: samdani (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /4,546 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼12.95ms] 75% from 4 tests

An overview of server-side resources used by GS Shots for Dribbble
It is recommended to improve the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 4,727.68ms on /wp-admin/admin.php?page=gs-drobbble-plugins-lite)
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4641.46 ▲1.18
Dashboard /wp-admin3.63 ▲0.2937.45 ▼22.72
Posts /wp-admin/edit.php3.75 ▲0.3944.93 ▲3.84
Add New Post /wp-admin/post-new.php5.84 ▼0.0474.82 ▼34.10
Media Library /wp-admin/upload.php3.60 ▲0.3741.28 ▲8.13
GS Plugins Pro /wp-admin/admin.php?page=gs-drobbble-plugins-premium3.79659.55
Help & Usage /wp-admin/admin.php?page=gs-drobbble-plugins-help3.6338.46
Dribbble Settings /wp-admin/admin.php?page=dribbble-settings3.6336.49
GS Plugins Lite /wp-admin/admin.php?page=gs-drobbble-plugins-lite3.904,727.68

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
gs_dribbble_settings
op_client
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

GS Shots for Dribbble: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,016 ▲25514.91 ▲0.631.52 ▼0.1539.52 ▼2.60
Dashboard /wp-admin2,410 ▲2396.43 ▲0.86110.08 ▲26.5491.25 ▲50.58
Posts /wp-admin/edit.php2,342 ▲2423.75 ▲1.7750.40 ▲7.8475.03 ▲31.65
Add New Post /wp-admin/post-new.php1,752 ▲21522.55 ▲4.37649.92 ▲49.7630.42 ▼27.44
Media Library /wp-admin/upload.php1,472 ▲724.41 ▲0.1882.22 ▼14.6287.14 ▲44.21
GS Plugins Pro /wp-admin/admin.php?page=gs-drobbble-plugins-premium2,4073.2549.5789.85
Help & Usage /wp-admin/admin.php?page=gs-drobbble-plugins-help1,1493.3444.0342.88
Dribbble Settings /wp-admin/admin.php?page=dribbble-settings1,3465.3582.3285.05
GS Plugins Lite /wp-admin/admin.php?page=gs-drobbble-plugins-lite2,7483.2943.60131.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • op_client
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • gs_dribbble_settings
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant GSD_FILES_DIR - assumed 'GSD_FILES_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/gs-dribbble-portfolio/gs-dribbble-assets/includes/gs-dribbble-root.php on line 3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/gs-dribbble-portfolio/gs-dribbble-assets/includes/templates/gs_drib_structure_one.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gs-dribbble-portfolio/gs-dribbble-assets/includes/gs-dribbble-shortcode.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/gs-dribbble-portfolio/gs_dribbble_portfolio.php:22
    • > PHP Fatal error
      require_once(): Failed opening required 'GSD_FILES_DIR/includes/gs-dribbble-shortcode.php' (include_path='.:/usr/share/php') in wp-content/plugins/gs-dribbble-portfolio/gs-dribbble-assets/includes/gs-dribbble-root.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gs-dribbble-portfolio/gs-dribbble-assets/gs-common-pages/gs-dribbble-common-pages.php:3
    • > PHP Notice
      Undefined variable: output in wp-content/plugins/gs-dribbble-portfolio/gs-dribbble-assets/includes/templates/gs_drib_structure_one.php on line 8
    • > PHP Warning
      require_once(GSD_FILES_DIR/includes/gs-dribbble-shortcode.php): failed to open stream: No such file or directory in wp-content/plugins/gs-dribbble-portfolio/gs-dribbble-assets/includes/gs-dribbble-root.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/gs-dribbble-portfolio/gs-dribbble-assets/includes/templates/gs_drib_structure_one.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'GS_Dribbble_WeDevs_Settings_API' not found in wp-content/plugins/gs-dribbble-portfolio/gs-dribbble-assets/admin/gs_dribbble_options_config.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=dribbble-settings
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=dribbble-settings
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: dribbble widget, wordpress widget, dribbble shortcode, dribbble api, dribbble portfolio shots...

gs-dribbble-portfolio/gs_dribbble_portfolio.php 77% from 13 tests

The entry point to "GS Shots for Dribbble" version 1.2.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 282 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
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gs-dribbble-portfolio.php" instead of "gs_dribbble_portfolio.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
No dangerous file extensions were detected5,718 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP137128822,621
CSS5140151,981
SVG200566
Sass11016521
JSON10021
JavaScript1208

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity37.86
▷ Minimum class complexity3.00
▷ Maximum class complexity70.00
Average method complexity2.70
▷ 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%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
gs-dribbble-assets/assets/img/icon-128x128.png6.61KB3.55KB▼ 46.25%
gs-dribbble-assets/admin/css/gsdribbble.png0.53KB0.46KB▼ 12.24%