84% dropbox-photo-sideloader

Code Review | Dropbox Photo Sideloader

WordPress plugin Dropbox Photo Sideloader scored84%from 54 tests.

About plugin

  • Plugin page: dropbox-photo-sid...
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Jun 23, 2012
  • Latest release: Sep 8, 2014
  • Number of updates: 19
  • Update frequency: every 54.5 days
  • Top authors: Otto42 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /19,090 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.57ms] Passed 4 tests

A check of server-side resources used by Dropbox Photo Sideloader
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1438.83 ▲1.65
Dashboard /wp-admin3.44 ▲0.0944.68 ▼14.24
Posts /wp-admin/edit.php3.56 ▲0.2046.32 ▼5.21
Add New Post /wp-admin/post-new.php6.02 ▲0.13111.58 ▲19.53
Media Library /wp-admin/upload.php3.36 ▲0.1333.81 ▼0.47

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dropbox Photo Sideloader
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.171.71 ▼0.0938.52 ▼1.38
Dashboard /wp-admin2,206 ▲155.84 ▲0.95102.37 ▲0.4040.37 ▼1.85
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0436.94 ▼1.6433.69 ▲1.21
Add New Post /wp-admin/post-new.php1,536 ▲823.28 ▼0.11627.69 ▼72.5851.22 ▼2.32
Media Library /wp-admin/upload.php1,382 ▼94.24 ▼0.0297.93 ▲0.9941.21 ▼2.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Dropbox_OAuth' not found in wp-content/plugins/dropbox-photo-sideloader/Dropbox/OAuth/Wordpress.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dropbox-photo-sideloader/dropbox-photo-sideloader.php:20

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: image, sideload, media, dropbox, photo

dropbox-photo-sideloader/dropbox-photo-sideloader.php Passed 13 tests

The entry point to "Dropbox Photo Sideloader" version 0.6 is a PHP file that has certain tags in its header comment area
108 characters long description:
Adds a new tab to the Media Uploader, which allows you to pull image files from your Dropbox into WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin4,915 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11012484,202
PHP5226369654
CSS111759

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.88
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2683.87%
▷ Protected methods13.23%
▷ Private methods412.90%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
i/doc-type-gif.png0.63KB0.50KB▼ 21.73%
i/doc-type-jpg.png0.67KB0.52KB▼ 21.52%
i/doc-type-png.png0.65KB0.50KB▼ 21.79%
js/themes/classic/d.png7.36KB2.58KB▼ 64.91%