84% acf-dropzone

Code Review | ACF Dropzone

WordPress plugin ACF Dropzone scored84%from 54 tests.

About plugin

  • Plugin page: acf-dropzone
  • Plugin version: 1.1.14
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 4, 2019
  • Latest release: Oct 31, 2023
  • Number of updates: 23
  • Update frequency: every 68.7 days
  • Top authors: podpirate (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /12,097 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.49ms] Passed 4 tests

A check of server-side resources used by ACF Dropzone
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0443.11 ▲2.32
Dashboard /wp-admin3.35 ▲0.0446.74 ▼3.90
Posts /wp-admin/edit.php3.46 ▲0.1046.08 ▼6.25
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.12 ▼4.07
Media Library /wp-admin/upload.php3.27 ▲0.0438.79 ▲0.25

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by ACF Dropzone
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.081.69 ▼0.0946.48 ▲0.08
Dashboard /wp-admin2,195 ▲155.61 ▼0.0283.90 ▼4.9737.78 ▼1.16
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0534.18 ▼2.4533.21 ▲1.59
Add New Post /wp-admin/post-new.php1,535 ▲918.23 ▼4.78634.08 ▼56.6870.27 ▲10.73
Media Library /wp-admin/upload.php1,403 ▲64.09 ▼0.1198.02 ▼2.4443.31 ▼1.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 9× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/acf-dropzone/include/AcfDropzone/Compat/ACF.php
    • > /wp-content/plugins/acf-dropzone/include/autoload.php
    • > /wp-content/plugins/acf-dropzone/index.php
    • > /wp-content/plugins/acf-dropzone/include/AcfDropzone/Core/Core.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
    • > /wp-content/plugins/acf-dropzone/include/AcfDropzone/Core/Plugin.php
    • > /wp-content/plugins/acf-dropzone/include/AcfDropzone/Asset/Asset.php

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: drag-drop, file upload, paste, acf

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

The main PHP script in "ACF Dropzone" version 1.1.14 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as 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
Good job! No executable or dangerous file extensions detected475 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10199356463
JSON1009
JavaScript2002
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces4
Interfaces2
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods50
▷ Static methods48.00%
▷ Public methods4284.00%
▷ Protected methods48.00%
▷ Private methods48.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin