88% acf-flexible-layouts-manager

Code Review | ACF Flexible Layouts Manager

WordPress plugin ACF Flexible Layouts Manager scored 88% from 54 tests.

About plugin

  • Plugin page: acf-flexible-layo...
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 5.9.2
  • First release: Apr 11, 2018
  • Latest release: Jul 12, 2019
  • Number of updates: 29
  • Update frequency: every 15.8 days
  • Top authors: valentinpellegrin (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active / 9,085 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼311.13ms] Passed 4 tests

A check of server-side resources used by ACF Flexible Layouts Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.4159.63 ▲39.15
Dashboard /wp-admin3.42 ▲0.0235.19 ▼1.40
Posts /wp-admin/edit.php3.65 ▲0.0243.42 ▼40.52
Add New Post /wp-admin/post-new.php6.89 ▼0.07106.52 ▼1,201.73
Media Library /wp-admin/upload.php3.31 ▲0.0132.34 ▼0.86

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for ACF Flexible Layouts Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,781 ▲3715.99 ▲0.306.34 ▲0.282.22 ▼0.04
Dashboard /wp-admin2,874 ▲206.09 ▼0.16122.76 ▼16.04158.09 ▼9.81
Posts /wp-admin/edit.php2,688 ▼03.23 ▼0.1464.44 ▲0.03143.21 ▼8.34
Add New Post /wp-admin/post-new.php1,752 ▲9120.81 ▲5.15458.40 ▲5.32195.06 ▲37.60
Media Library /wp-admin/upload.php1,698 ▼05.51 ▼0.03154.77 ▼0.07217.30 ▲26.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/acf-flexible-layouts-manager/acf-flexible-layouts-manager.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-flexible-layouts-manager/includes/ajax/ajax-copy.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/acf-flexible-layouts-manager/helpers/add-button.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-flexible-layouts-manager/includes/ajax/ajax-paste.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-flexible-layouts-manager/includes/paste.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-flexible-layouts-manager/includes/ajax/ajax-select.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-flexible-layouts-manager/includes/ajax/ajax-duplicate.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-flexible-layouts-manager/includes/select.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-flexible-layouts-manager/includes/languages.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

acf-flexible-layouts-manager/acf-flexible-layouts-manager.php Passed 13 tests

The principal PHP file in "ACF Flexible Layouts Manager" v. 1.1.6 is loaded by WordPress automatically on each request
86 characters long description:
Add "Copy", "Duplicate", "Import" & "Paste" options for layout in ACF Flexible Content

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 plugin760 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript611782343
PHP99931279
PO File1222274
CSS10064

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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