84% wp-dropzone

Code Review | WP Dropzone

WordPress plugin WP Dropzone scored84%from 54 tests.

About plugin

  • Plugin page: wp-dropzone
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Nov 2, 2017
  • Latest release: Dec 28, 2021
  • Number of updates: 14
  • Update frequency: every 108.4 days
  • Top authors: wpday (42.86%)ximdevs (35.71%)nazsabuz (28.57%)mdsabuz (14.29%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /2,194 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.83ms] Passed 4 tests

Analyzing server-side resources used by WP Dropzone
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.94 ▼0.89
Dashboard /wp-admin3.35 ▼0.0052.29 ▼8.63
Posts /wp-admin/edit.php3.40 ▲0.0452.19 ▲9.79
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.80 ▼14.37
Media Library /wp-admin/upload.php3.27 ▲0.0436.33 ▼7.42

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP Dropzone
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▲0.361.69 ▼0.1843.06 ▼0.77
Dashboard /wp-admin2,206 ▲185.87 ▼0.0497.52 ▼4.5339.07 ▲3.17
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0040.14 ▼0.7934.31 ▼3.30
Add New Post /wp-admin/post-new.php1,532 ▲423.40 ▲5.22672.04 ▲62.3265.21 ▲2.33
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.1297.99 ▼3.4941.85 ▼1.24

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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 fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-dropzone/includes/core-functions.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: wpdropzone, file, media upload, file upload, media...

wp-dropzone/wp-dropzone.php Passed 13 tests

"WP Dropzone" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
57 characters long description:
Upload files into WordPress media library from front-end.

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
Success! There were no dangerous files found in this plugin8,060 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,8921,1127,438
CSS210474
PHP33458148

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.98
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected