79% acf-flexible-content-preview

Code Review | Flexible Content Preview for Advanced Custom Fields

WordPress plugin Flexible Content Preview for Advanced Custom Fields scored 79% from 54 tests.

About plugin

  • Plugin page: acf-flexible-cont...
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.8
  • WordPress version: 5.8.1
  • First release: Aug 17, 2019
  • Latest release: Aug 26, 2021
  • Number of updates: 10
  • Update frequency: every 74.1 days
  • Top authors: jameelmoses (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 6,226 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.72MB] [CPU: ▼209.09ms] Passed 4 tests

An overview of server-side resources used by Flexible Content Preview for Advanced Custom Fields
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.91 ▼0.825.17 ▼12.36
Dashboard /wp-admin1.93 ▼1.135.83 ▼29.42
Posts /wp-admin/edit.php1.93 ▼1.185.15 ▼26.28
Add New Post /wp-admin/post-new.php1.93 ▼3.515.06 ▼763.16
Media Library /wp-admin/upload.php1.93 ▼1.075.61 ▼17.51

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Flexible Content Preview for Advanced Custom Fields
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,688 ▲8715.70 ▼0.304.97 ▼0.0475.82 ▼1.95
Dashboard /wp-admin2,942 ▲466.11 ▼0.05116.17 ▼19.81170.17 ▼4.15
Posts /wp-admin/edit.php2,755 ▲123.24 ▲0.0063.29 ▼0.04137.72 ▼3.66
Add New Post /wp-admin/post-new.php3,734 ▼7315.53 ▼3.57435.38 ▼43.21163.20 ▼0.41
Media Library /wp-admin/upload.php1,761 ▲95.51 ▲0.02140.64 ▼0.19189.10 ▲6.69

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
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-content/plugins/acf-flexible-content-preview/classes/requirements.php+31
    Advanced Custom Fields is a required plugin.

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/acf-flexible-content-preview/acf-flexible-content-preview.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Trait 'FCP\\Singleton' not found in wp-content/plugins/acf-flexible-content-preview/classes/requirements.php on line 5
    • > PHP Fatal error
      Trait 'FCP\\Singleton' not found in wp-content/plugins/acf-flexible-content-preview/classes/main.php on line 5
    • > PHP Warning
      Use of undefined constant FCP_DIR - assumed 'FCP_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/acf-flexible-content-preview/autoload.php on line 154

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


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: flexible, advanced, addon, custom, acf...

acf-flexible-content-preview/acf-flexible-content-preview.php Passed 13 tests

The main file in "Flexible Content Preview for Advanced Custom Fields" v. 1.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
87 characters long description:
Transforms ACF's flexible content field's layout list into a modal with image previews.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin979 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity6.80
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
▷ Static methods313.04%
▷ Public methods1460.87%
▷ Protected methods521.74%
▷ Private methods417.39%
▷ Named functions133.33%
▷ Anonymous functions266.67%
▷ Global constants5100.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