84% acf-flexible-columns

Code Review | ACF Flexible Columns

WordPress plugin ACF Flexible Columns scored 84% 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: 6.3.1
  • 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

40+ active / 3,384 total downloads

Benchmarks

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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.90ms] Passed 4 tests

This is a short check of server-side resources used by ACF Flexible Columns
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.16 ▼8.85
Dashboard /wp-admin3.31 ▲0.0044.81 ▼5.20
Posts /wp-admin/edit.php3.36 ▲0.0043.55 ▼4.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.14 ▼13.03
Media Library /wp-admin/upload.php3.23 ▲0.0037.60 ▲5.54

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for ACF Flexible Columns
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.30 ▼1.101.72 ▼0.3737.71 ▼13.71
Dashboard /wp-admin2,203 ▲185.81 ▲0.92104.75 ▼7.9841.73 ▼4.70
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0440.22 ▲1.3535.28 ▲2.79
Add New Post /wp-admin/post-new.php1,514 ▼017.60 ▼0.02597.40 ▼23.5754.79 ▲5.32
Media Library /wp-admin/upload.php1,391 ▼04.30 ▲0.0795.61 ▼7.8843.61 ▼3.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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
    • > 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
      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 Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-flexible-columns/acf-flexible-columns.php:16
    • > 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 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(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
      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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: advanced custom fields, slider, acf, animate on scroll, bootstrap...

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

"ACF Flexible Columns" version 1.1.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please 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
Everything looks great! No dangerous files found in this plugin6,365 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JSON1105,379
PHP38148524
CSS54617373
JavaScript3134776
SVG11013

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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%