88% acf-dropzone

Code Review | ACF Dropzone

WordPress plugin ACF Dropzone scored 88% from 54 tests.

About plugin

  • Plugin page: acf-dropzone
  • Plugin version: 1.1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.9.2
  • First release: Jul 4, 2019
  • Latest release: Jan 23, 2022
  • Number of updates: 15
  • Update frequency: every 62.3 days
  • Top authors: podpirate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active / 5,341 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼306.45ms] Passed 4 tests

Server-side resources used by ACF Dropzone
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1158.50 ▼9.42
Dashboard /wp-admin3.45 ▲0.0438.82 ▲5.06
Posts /wp-admin/edit.php3.69 ▲0.0449.61 ▼50.32
Add New Post /wp-admin/post-new.php6.93 ▼0.0599.32 ▼1,168.65
Media Library /wp-admin/upload.php3.34 ▲0.0430.06 ▲2.61

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by ACF Dropzone
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,766 ▲1215.93 ▲0.276.19 ▼0.362.21 ▼0.80
Dashboard /wp-admin2,899 ▲426.12 ▼0.01141.70 ▲18.52166.87 ▲3.38
Posts /wp-admin/edit.php2,691 ▼03.23 ▼0.0063.58 ▼1.54217.48 ▲68.81
Add New Post /wp-admin/post-new.php1,661 ▼9916.50 ▼6.14409.20 ▼42.07158.06 ▼1.94
Media Library /wp-admin/upload.php1,698 ▼05.52 ▲0.03141.48 ▼12.64258.21 ▲60.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 9× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/acf-dropzone/include/autoload.php
    • > /wp-content/plugins/acf-dropzone/include/AcfDropzone/Core/Core.php
    • > /wp-content/plugins/acf-dropzone/include/AcfDropzone/Core/Plugin.php
    • > /wp-content/plugins/acf-dropzone/include/AcfDropzone/Compat/ACF.php
    • > /wp-content/plugins/acf-dropzone/include/AcfDropzone/Asset/Asset.php
    • > /wp-content/plugins/acf-dropzone/index.php
    • > /wp-content/plugins/acf-dropzone/include/AcfDropzone/Core/CoreInterface.php
    • > /wp-content/plugins/acf-dropzone/include/AcfDropzone/Core/ComponentInterface.php
    • > /wp-content/plugins/acf-dropzone/include/AcfDropzone/Core/Singleton.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AcfDropzone\\add_filter() in wp-content/plugins/acf-dropzone/test/test.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: paste, file upload, drag-drop, acf

acf-dropzone/index.php 92% from 13 tests

The main file in "ACF Dropzone" v. 1.1.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acf-dropzone.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin737 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11219365526
JSON100208
JavaScript2002
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces4
Interfaces2
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods55
▷ Static methods47.27%
▷ Public methods4785.45%
▷ Protected methods47.27%
▷ Private methods47.27%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
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
PNG images were not found in this plugin