100% 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 scored 100% 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: 5.9.2
  • 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

400+ active / 8,183 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Advanced Custom Fields: Real Media Library Folder Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0151.94 ▼0.45
Dashboard /wp-admin3.41 ▲0.0133.08 ▼0.96
Posts /wp-admin/edit.php3.65 ▲0.0135.80 ▲0.09
Add New Post /wp-admin/post-new.php6.89 ▼0.0891.66 ▼1,178.19
Media Library /wp-admin/upload.php3.30 ▲0.0125.67 ▼0.33

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Custom Fields: Real Media Library Folder Field
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.83 ▲0.226.28 ▲0.392.31 ▼0.13
Dashboard /wp-admin2,888 ▲276.01 ▼0.20118.01 ▼20.77159.99 ▼6.97
Posts /wp-admin/edit.php2,691 ▼03.24 ▼0.0063.93 ▼5.34137.33 ▼12.84
Add New Post /wp-admin/post-new.php1,696 ▼021.60 ▲0.50466.62 ▲21.06160.40 ▲5.03
Media Library /wp-admin/upload.php1,698 ▼05.51 ▼0.04149.74 ▲10.97192.69 ▲5.79

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
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: real media library, acf, media library folders, advanced custom fields, folder field

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

The main PHP file in "Advanced Custom Fields: Real Media Library Folder Field" ver. 1.1.4 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to 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 check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous 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
There are no cyclomatic complexity problems 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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin