72% filestack-upload

Code Review | Filestack Official

WordPress plugin Filestack Official scored 72% from 54 tests.

About plugin

  • Plugin page: filestack-upload
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Aug 30, 2017
  • Latest release: Aug 4, 2023
  • Number of updates: 23
  • Update frequency: every 94.2 days
  • Top authors: filestack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 2,901 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.78ms] Passed 4 tests

This is a short check of server-side resources used by Filestack Official
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.21 ▲0.02
Dashboard /wp-admin3.35 ▲0.0444.49 ▼10.21
Posts /wp-admin/edit.php3.46 ▲0.1045.49 ▼3.27
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.19 ▼17.67
Media Library /wp-admin/upload.php3.27 ▲0.0435.38 ▲0.83
Shortcode Generator /wp-admin/admin.php?page=filestack-shortcode-generator3.2932.80
Settings /wp-admin/admin.php?page=filestack-settings3.4033.31
FAQ /wp-admin/admin.php?page=filestack-faq3.2730.49

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_filestack_file_convert
widget_recent-comments
theysaidso_admin_options
widget_filestack_videotoaudio_convert
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Filestack Official
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,983 ▲22614.53 ▼0.109.06 ▲7.3842.15 ▼2.75
Dashboard /wp-admin2,235 ▲475.61 ▼0.23102.74 ▼1.4277.76 ▲33.57
Posts /wp-admin/edit.php2,130 ▲412.59 ▲0.4338.73 ▼2.1333.43 ▼0.51
Add New Post /wp-admin/post-new.php1,568 ▲4923.61 ▲0.31660.15 ▼25.1936.04 ▼28.53
Media Library /wp-admin/upload.php1,426 ▲444.92 ▲0.7297.66 ▼12.6573.65 ▲23.90
Shortcode Generator /wp-admin/admin.php?page=filestack-shortcode-generator1,3762.4927.8651.19
Settings /wp-admin/admin.php?page=filestack-settings2,2172.3731.7423.87
FAQ /wp-admin/admin.php?page=filestack-faq9862.4826.9730.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_filestack_videotoaudio_convert
    • can_compress_scripts
    • widget_filestack_file_convert
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/filestack-upload/lib/admin-faq.php
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/filestack-upload/widget/file-type-convert.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'FILESTACK_PLUGIN_PATH/filestack-wordpress-upload.php' (include_path='.:/usr/share/php') in wp-content/plugins/filestack-upload/lib/admin-settings.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/filestack-upload/lib/filestack_ajax.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/filestack-upload/filestack-wordpress-upload.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/filestack-upload/lib/scripts.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'FILESTACK_PLUGIN_PATH/filestack-wordpress-upload.php' (include_path='.:/usr/share/php') in wp-content/plugins/filestack-upload/lib/admin-shortcode-generator.php on line 2
    • > PHP Warning
      Use of undefined constant FILESTACK_PLUGIN_PATH - assumed 'FILESTACK_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/filestack-upload/lib/admin-settings.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/filestack-upload/lib/admin_integration.php:9
    • > PHP Warning
      require_once(FILESTACK_PLUGIN_PATH/filestack-wordpress-upload.php): failed to open stream: No such file or directory in wp-content/plugins/filestack-upload/lib/admin-settings.php on line 2
    • > PHP Warning
      Use of undefined constant FILESTACK_PLUGIN_PATH - assumed 'FILESTACK_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/filestack-upload/lib/admin-shortcode-generator.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=filestack-faq
    • > Javascript (severe) in unknown
    /wp-content/plugins/filestack-upload/js/filestack-3.25.0.js?ver=6.3.1 40:131447 Uncaught Error: An apikey is required to initialize the Filestack client

Optimizations

Plugin configuration 86% 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:
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4, #5, #6, #7 in filestack-upload/assets to your readme.txt
The official readme.txt is a good inspiration

filestack-upload/filestack-wordpress-upload.php 77% from 13 tests

"Filestack Official" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("filestack-upload.php" instead of "filestack-wordpress-upload.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 161 characters long)

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
Everything looks great! No dangerous files found in this plugin6,236 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP121949341,722
JavaScript7164140958
CSS51585885

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity29.33
▷ Minimum class complexity7.00
▷ Maximum class complexity59.00
Average method complexity9.50
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1583.33%
▷ Anonymous functions316.67%
Constants5
▷ Global constants5100.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 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
fsicon.png0.62KB0.28KB▼ 55.31%