93% acf-flexible-content-toggler

Code Review | Advanced Custom Fields: Flexible Content Toggler

WordPress plugin Advanced Custom Fields: Flexible Content Toggler scored 93% from 54 tests.

About plugin

  • Plugin page: acf-flexible-cont...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 5.9.2
  • First release: Feb 2, 2014
  • Latest release: Feb 2, 2014
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: bluoma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 2,173 total downloads


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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Advanced Custom Fields: Flexible Content Toggler
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0151.43 ▲1.69
Dashboard /wp-admin3.42 ▲0.0133.00 ▼0.85
Posts /wp-admin/edit.php3.65 ▲0.0139.22 ▲0.68
Add New Post /wp-admin/post-new.php6.89 ▼0.0993.79 ▼1,214.88
Media Library /wp-admin/upload.php3.30 ▲0.0023.10 ▼1.05

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields: Flexible Content Toggler
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲1516.23 ▲0.565.63 ▼0.252.05 ▼0.35
Dashboard /wp-admin2,895 ▲346.12 ▼0.09116.01 ▼21.72157.50 ▼2.99
Posts /wp-admin/edit.php2,685 ▼63.23 ▼0.0063.22 ▲2.67138.66 ▼2.65
Add New Post /wp-admin/post-new.php1,661 ▼4916.16 ▼5.41406.32 ▼26.81158.63 ▲6.23
Media Library /wp-admin/upload.php1,701 ▲35.52 ▲0.03135.90 ▼5.27178.40 ▼10.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-flexible-content-toggler/acf_flexible_content_toggler.php:23

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


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
Please take inspiration from this readme.txt

acf-flexible-content-toggler/acf_flexible_content_toggler.php 85% from 13 tests

"Advanced Custom Fields: Flexible Content Toggler" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("acf-flexible-content-toggler.php" instead of "acf_flexible_content_toggler.php")
  • Description: The description should be shorter than 140 characters (currently 384 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected37 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ 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
No PNG files were detected