83% filepicker-media-uploader

Code Review | Filestack

WordPress plugin Filestack scored83%from 54 tests.

About plugin

  • Plugin page: filepicker-media-...
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Dec 2, 2013
  • Latest release: Nov 21, 2016
  • Number of updates: 20
  • Update frequency: every 54.5 days
  • Top authors: jasonfilepicker (65%)shanaver (30%)kwminnick (15%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /2,943 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.05MB] [CPU: ▼5.27ms] Passed 4 tests

A check of server-side resources used by Filestack
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.18 ▲6.02
Dashboard /wp-admin3.36 ▲0.0243.14 ▼15.22
Posts /wp-admin/edit.php3.42 ▲0.0649.56 ▲5.56
Add New Post /wp-admin/post-new.php5.95 ▲0.0679.79 ▼12.42
Media Library /wp-admin/upload.php3.29 ▲0.0635.00 ▲1.02
Filestack /wp-admin/options-general.php?page=filepicker3.2829.40

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Filestack
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,977 ▲22714.43 ▼0.1419.43 ▲17.9038.83 ▼3.09
Dashboard /wp-admin2,260 ▲835.42 ▼0.20102.40 ▲15.2736.68 ▼3.21
Posts /wp-admin/edit.php2,171 ▲712.78 ▲0.7646.92 ▲10.0833.63 ▼1.52
Add New Post /wp-admin/post-new.php1,578 ▲4923.40 ▲0.05689.73 ▲4.7236.49 ▼16.74
Media Library /wp-admin/upload.php1,471 ▲774.92 ▲0.74104.67 ▲7.0439.55 ▼6.58
Filestack /wp-admin/options-general.php?page=filepicker1,2542.3549.7142.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/filepicker-media-uploader/lib/filepicker_ajax.php:12
    • > PHP Warning
      require_once(FILEPICKER_PLUGIN_PATH/filepicker.php): failed to open stream: No such file or directory in wp-content/plugins/filepicker-media-uploader/lib/admin-options.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/filepicker-media-uploader/lib/admin_integration.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/filepicker-media-uploader/lib/languages.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/filepicker-media-uploader/lib/scripts.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/filepicker-media-uploader/filepicker.php:23
    • > PHP Warning
      Use of undefined constant FILEPICKER_PLUGIN_PATH - assumed 'FILEPICKER_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/filepicker-media-uploader/lib/admin-options.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'FILEPICKER_PLUGIN_PATH/filepicker.php' (include_path='.:/usr/share/php') in wp-content/plugins/filepicker-media-uploader/lib/admin-options.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/filepicker-media-uploader/lib/shortcodes.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: The official readme.txt might help

filepicker-media-uploader/filepicker.php 85% from 13 tests

The entry point to "Filestack" version 2.0.8 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("filepicker-media-uploader.php" instead of "filepicker.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 Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected644 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP87076389
JavaScript33235168
PO File3152487
CSS1010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity3.00
▷ Minimum method complexity2.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions1083.33%
▷ Anonymous functions216.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
There were not PNG files found in your plugin