94% acf-flexible-columns

Code Review | ACF Flexible Columns

WordPress plugin ACF Flexible Columns scored 94% from 54 tests.

About plugin

  • Plugin page: acf-flexible-columns
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.5
  • WordPress version: 5.9.2
  • First release: Jul 6, 2016
  • Latest release: Apr 19, 2018
  • Number of updates: 21
  • Update frequency: every 31.1 days
  • Top authors: imageDESIGN (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 3,037 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by ACF Flexible Columns
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.29 ▲2.50
Dashboard /wp-admin3.41 ▲0.0031.83 ▲0.24
Posts /wp-admin/edit.php3.65 ▲0.0039.76 ▲2.74
Add New Post /wp-admin/post-new.php6.88 ▼0.0993.04 ▼1,184.38
Media Library /wp-admin/upload.php3.30 ▲0.0023.55 ▼2.39

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

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

Browser metrics Passed 4 tests

ACF Flexible Columns: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.79 ▲0.046.42 ▲0.822.61 ▲0.14
Dashboard /wp-admin2,895 ▲346.07 ▼0.12115.77 ▼14.70159.42 ▼3.55
Posts /wp-admin/edit.php2,694 ▼03.23 ▼0.0165.24 ▲1.30145.54 ▼0.27
Add New Post /wp-admin/post-new.php1,661 ▲1016.77 ▼1.62422.81 ▼26.59163.91 ▼0.62
Media Library /wp-admin/upload.php1,701 ▲35.46 ▼0.04134.55 ▼14.31190.15 ▼3.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following items
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-flexible-columns/acf-flexible-columns.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/acf-flexible-columns/layout-function-sample.php:12
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/acf-flexible-columns/acf-flexible-columns.php on line 11
    • > PHP Warning
      include_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/acf-flexible-columns/acf-flexible-columns.php on line 10
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-includes/pluggable.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/acf-flexible-columns/acf-flexible-columns.php on line 10
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/acf-flexible-columns/acf-flexible-columns.php on line 11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/acf-flexible-columns/acf-flexible-columns.php on line 10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/acf-flexible-columns/acf-flexible-columns.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
7 plugin tags: carousel, advanced custom fields, acf, columns, bootstrap...

acf-flexible-columns/acf-flexible-columns.php 92% from 13 tests

"ACF Flexible Columns" version 1.1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 254 characters long)

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
No dangerous file extensions were detected6,365 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JSON1105,379
PHP38148524
CSS54617373
JavaScript3134776
SVG11013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity103.00
▷ Minimum class complexity103.00
▷ Maximum class complexity103.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.69MB with 0.35MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png500.08KB246.62KB▼ 50.68%
assets/screenshot-1.png211.22KB104.71KB▼ 50.43%