90% acf-real-media-library-field

Code Review | Advanced Custom Fields: Real Media Library Folder Field

WordPress plugin Advanced Custom Fields: Real Media Library Folder Field scored90%from 54 tests.

About plugin

  • Plugin page: acf-real-media-li...
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Dec 11, 2016
  • Latest release: Apr 3, 2020
  • Number of updates: 19
  • Update frequency: every 63.5 days
  • Top authors: mguenter (89.47%)devowl (15.79%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /8,682 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.01MB] [CPU: ▼8.12ms] Passed 4 tests

Analyzing server-side resources used by Advanced Custom Fields: Real Media Library Folder Field
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.24 ▼2.57
Dashboard /wp-admin3.31 ▲0.0149.78 ▼4.24
Posts /wp-admin/edit.php3.36 ▲0.0146.16 ▼7.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.67 ▼16.95
Media Library /wp-admin/upload.php3.23 ▲0.0134.08 ▼3.48

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields: Real Media Library Folder Field
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.31 ▼0.291.82 ▼0.1344.04 ▲0.61
Dashboard /wp-admin2,195 ▲185.54 ▼0.1291.63 ▼2.7241.58 ▲1.87
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0337.20 ▲3.2035.86 ▲1.49
Add New Post /wp-admin/post-new.php1,528 ▼022.97 ▼0.11663.06 ▼35.8755.91 ▼1.18
Media Library /wp-admin/upload.php1,403 ▲94.23 ▲0.03100.84 ▼7.0943.72 ▼2.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: advanced custom fields, real media library, folder field, acf, media library folders

acf-real-media-library-field/acf-real_media_library.php 92% from 13 tests

The entry point to "Advanced Custom Fields: Real Media Library Folder Field" version 1.1.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("acf-real-media-library-field.php" instead of "acf-real_media_library.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin384 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP3145174353
JavaScript21115
Markdown510015
CSS1001

PHP code Passed 2 tests

An short overview of 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.45
Average class complexity17.00
▷ Minimum class complexity4.00
▷ Maximum class complexity30.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin