62% integrate-google-drive

Code Review | Integrate Google Drive - Browse, Upload, Download, Embed, Play, Share, Gallery, and Manage Your Google Drive Files Into Your WordPress Site

WordPress plugin Integrate Google Drive - Browse, Upload, Download, Embed, Play, Share, Gallery, and Manage Your Google Drive Files Into Your WordPress Site scored62%from 54 tests.

About plugin

  • Plugin page: integrate-google-...
  • Plugin version: 1.3.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 1, 2022
  • Latest release: Dec 3, 2023
  • Number of updates: 91
  • Update frequency: every 7.8 days
  • Top authors: princeahmed (100%)

Code review

54 tests

User reviews

75 reviews

Install metrics

5,000+ active /90,096 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.73MB] [CPU: ▲37.25ms] 75% from 4 tests

This is a short check of server-side resources used by Integrate Google Drive - Browse, Upload, Download, Embed, Play, Share, Gallery, and Manage Your Google Drive Files Into Your WordPress Site
It is recommended to improve the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.73MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.26 ▲5.7977.41 ▲34.65
Dashboard /wp-admin9.28 ▲5.9787.16 ▲39.80
Posts /wp-admin/edit.php9.28 ▲5.9292.47 ▲48.49
Add New Post /wp-admin/post-new.php11.12 ▲5.23125.47 ▲31.15
Media Library /wp-admin/upload.php9.28 ▲6.0576.75 ▲43.38
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.2866.87

Server storage [IO: ▲8.64MB] [DB: ▲0.01MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/integrate-google-drive/" and "wp-content/uploads/"
    • (new file) wp-content/integrate-google-drive-cache/.empty
Filesystem: 611 new files
Database: 3 new tables, 12 new options
New tables
wp_integrate_google_drive_shortcodes
wp_integrate_google_drive_logs
wp_integrate_google_drive_files
New WordPress options
fs_active_plugins
fs_debug_mode
igd_version
widget_theysaidso_widget
igd_install_time
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
fs_accounts
igd_notices
...

Browser metrics Passed 4 tests

A check of browser resources used by Integrate Google Drive - Browse, Upload, Download, Embed, Play, Share, Gallery, and Manage Your Google Drive Files Into Your WordPress Site
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9314.30 ▼0.101.87 ▲0.1128.07 ▼15.00
Dashboard /wp-admin2,220 ▲425.52 ▼0.2596.91 ▼16.9989.18 ▲44.62
Posts /wp-admin/edit.php2,144 ▲411.98 ▼0.0141.35 ▼1.3136.54 ▼3.80
Add New Post /wp-admin/post-new.php1,591 ▲6523.12 ▼0.08709.32 ▲73.1539.02 ▼18.19
Media Library /wp-admin/upload.php1,502 ▲1024.23 ▲0.1098.79 ▲0.8873.26 ▲24.41
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1081.6527.0029.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/integrate-google-drive/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie tables were found after uninstall: 3 tables
    • wp_integrate_google_drive_logs
    • wp_integrate_google_drive_shortcodes
    • wp_integrate_google_drive_files
  • The uninstall procedure has failed, leaving 12 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • fs_accounts
    • can_compress_scripts
    • theysaidso_admin_options
    • igd_version
    • fs_active_plugins
    • igd_install_time
    • widget_recent-comments
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 39× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/integrate-google-drive/includes/divi/includes/modules/Gallery/Gallery.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'IGDGoogle_Service' not found in wp-content/plugins/integrate-google-drive/vendors/Google-sdk/src/Google/Service/Drive.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function IGD\\add_action() in wp-content/plugins/integrate-google-drive/includes/class-shortcode-locations.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/integrate-google-drive/includes/divi/includes/modules/Slider/Slider.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/integrate-google-drive/includes/views/getting-started/basic-usage.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'IGDGoogle_Service' not found in wp-content/plugins/integrate-google-drive/vendors/Google-sdk/src/Google/Service/Oauth2.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function IGD\\add_filter() in wp-content/plugins/integrate-google-drive/includes/integrations/class-tutor.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/integrate-google-drive/vendors/ZipStream/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'ZipStream\\Stream' not found in wp-content/plugins/integrate-google-drive/vendors/ZipStream/src/DeflateStream.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ZipStream\\Exception' not found in wp-content/plugins/integrate-google-drive/vendors/ZipStream/src/Exception/StreamNotReadableException.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
Please take inspiration from this readme.txt

integrate-google-drive/plugin.php 85% from 13 tests

"Integrate Google Drive - Browse, Upload, Download, Embed, Play, Share, Gallery, and Manage Your Google Drive Files Into Your WordPress Site" version 1.3.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 174 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("integrate-google-drive.php" instead of "plugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected86,675 lines of code in 486 files:
LanguageFilesBlank linesComment linesLines of code
PHP28712,98025,13258,599
JSON160020,513
CSS5088675,316
SVG92001,979
JavaScript4044109249
XML11019

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity26.02
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces11
Interfaces9
Traits0
Classes251
▷ Abstract classes103.98%
▷ Concrete classes24196.02%
▷ Final classes52.07%
Methods3,092
▷ Static methods33610.87%
▷ Public methods2,58883.70%
▷ Protected methods531.71%
▷ Private methods45114.59%
Functions256
▷ Named functions22587.89%
▷ Anonymous functions3112.11%
Constants243
▷ Global constants11246.09%
▷ Class constants13153.91%
▷ Public constants13099.24%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
68 PNG files occupy 0.43MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/settings/buddyboss.png2.42KB2.23KB▼ 7.98%
assets/images/user-icon.png0.50KB0.33KB▼ 33.53%
assets/images/icons/powerpoint.png0.79KB0.79KB0.12%
assets/images/settings/acf.png5.68KB2.49KB▼ 56.17%
assets/images/icons/script.png0.65KB0.72KB0.00%