10% simple-dropbox-upload-form

Code Review | Simple Dropbox Upload

WordPress plugin Simple Dropbox Upload scored10%from 54 tests.

About plugin

  • Plugin page: simple-dropbox-up...
  • Plugin version: 1.8.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Dec 25, 2011
  • Latest release: Sep 18, 2013
  • Number of updates: 211
  • Update frequency: every 3.0 days
  • Top authors: hiphopsmurf (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

400+ active /37,676 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/simple-dropbox-upload-form/inc/wpsdb_auth.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; wpsdbAuth has a deprecated constructor

Server metrics [RAM: ▼1.62MB] [CPU: ▼56.00ms] Passed 4 tests

Server-side resources used by Simple Dropbox Upload
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.37 ▼1.106.14 ▼40.56
Dashboard /wp-admin2.39 ▼0.927.49 ▼44.03
Posts /wp-admin/edit.php2.39 ▼0.977.97 ▼41.29
Add New Post /wp-admin/post-new.php2.39 ▼3.506.81 ▼98.13
Media Library /wp-admin/upload.php2.39 ▼0.846.93 ▼29.15

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 84 new files
Database: no new tables, 21 new options
New WordPress options
wpsdb_thank_color
wpsdb_delete_file
wpsdb_show_multi
wpsdb_show_multi_size
wpsdb_show_progress
wpsdb_activation_redirect
wpsdb_multi_link_text
wpsdb_show_form
widget_recent-comments
wpsdb_path
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Dropbox Upload
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.23 ▼0.121.74 ▲0.0142.74 ▼2.03
Dashboard /wp-admin2,206 ▲295.51 ▼0.1587.63 ▼15.0376.94 ▲30.36
Posts /wp-admin/edit.php2,125 ▲252.01 ▲0.0235.31 ▼1.8731.77 ▼0.68
Add New Post /wp-admin/post-new.php1,691 ▲16020.02 ▼2.70744.80 ▲114.0653.05 ▼0.67
Media Library /wp-admin/upload.php1,413 ▲134.22 ▲0.02101.28 ▼1.5867.47 ▲25.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/simple-dropbox-upload-form/inc/wpsdb_auth.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; wpsdbAuth has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-dropbox-upload-form/index.php
  • 67× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      require_once(HTTP/Request2/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/simple-dropbox-upload-form/inc/Dropbox/pear_includes/HTTP/Request2/Response.php on line 47
    • > PHP Warning
      require_once(HTTP/OAuth/Message.php): failed to open stream: No such file or directory in wp-content/plugins/simple-dropbox-upload-form/inc/Dropbox/pear_includes/HTTP/OAuth/Consumer/Response.php on line 24
    • > PHP Warning
      require_once(HTTP/OAuth/Message.php): failed to open stream: No such file or directory in wp-content/plugins/simple-dropbox-upload-form/inc/Dropbox/pear_includes/HTTP/OAuth/Provider/Request.php on line 22
    • > PHP Fatal error
      require_once(): Failed opening required 'HTTP/OAuth/Exception.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-dropbox-upload-form/inc/Dropbox/pear_includes/HTTP/OAuth/Provider/Exception.php on line 24
    • > PHP Fatal error
      require_once(): Failed opening required 'HTTP/Request2.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-dropbox-upload-form/inc/Dropbox/pear_includes/HTTP/Request2/CookieJar.php on line 45
    • > PHP Warning
      require_once(HTTP/OAuth/Provider/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/simple-dropbox-upload-form/inc/Dropbox/pear_includes/HTTP/OAuth/Provider/Exception/InvalidRequest.php on line 22
    • > PHP Warning
      require_once(HTTP/OAuth/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/simple-dropbox-upload-form/inc/Dropbox/pear_includes/HTTP/OAuth/Provider/Exception.php on line 24
    • > PHP Warning
      require_once(PEAR/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/simple-dropbox-upload-form/inc/Dropbox/pear_includes/HTTP/Request2/Exception.php on line 47
    • > PHP Fatal error
      require_once(): Failed opening required 'HTTP/Request2/Adapter.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-dropbox-upload-form/inc/Dropbox/pear_includes/HTTP/Request2/Adapter/Socket.php on line 47
    • > PHP Warning
      require_once(PEAR/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/simple-dropbox-upload-form/inc/Dropbox/pear_includes/HTTP/OAuth/Exception.php on line 24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Admin Panel before activation.), #2 (Step 1 of dropbox authorization.), #3 (Step 2 of dropbox authorization.), #4 (Step 3 of dropbox authorization.), #5 (Before a file is uploaded by user.), #6 (After a file is uploaded by user.)
Please take inspiration from this readme.txt

simple-dropbox-upload-form/wp-dropbox.php 92% from 13 tests

The entry point to "Simple Dropbox Upload" version 1.8.8.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-dropbox-upload-form.php" instead of "wp-dropbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected14,225 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,8211,5147,444
PHP502,0545,1795,857
CSS71334924

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity18.37
▷ Minimum class complexity1.00
▷ Maximum class complexity190.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes50
▷ Abstract classes612.00%
▷ Concrete classes4488.00%
▷ Final classes00.00%
Methods320
▷ Static methods237.19%
▷ Public methods26281.88%
▷ Protected methods4815.00%
▷ Private methods103.12%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants59
▷ Global constants23.39%
▷ Class constants5796.61%
▷ Public constants57100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 PNG files occupy 0.43MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pinterest.png1.96KB1.16KB▼ 41.07%
screenshot-6.png52.96KB29.79KB▼ 43.76%
css/dragup/glyphicons-halflings-white.png8.57KB9.20KB0.00%
screenshot-3.png37.66KB15.10KB▼ 59.89%
images/twitter.png2.38KB1.36KB▼ 42.72%