94% acf-accordion

Code Review | Advanced Custom Fields: Accordion Tab Field

WordPress plugin Advanced Custom Fields: Accordion Tab Field scored 94% from 54 tests.

About plugin

  • Plugin page: acf-accordion
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5
  • WordPress version: 5.9.2
  • First release: Apr 6, 2015
  • Latest release: Apr 17, 2016
  • Number of updates: 13
  • Update frequency: every 29.0 days
  • Top authors: bogdand (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active / 16,839 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by Advanced Custom Fields: Accordion Tab Field
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0152.57 ▲4.44
Dashboard /wp-admin3.41 ▲0.0132.52 ▼2.61
Posts /wp-admin/edit.php3.65 ▲0.0136.26 ▼2.51
Add New Post /wp-admin/post-new.php6.88 ▼0.0993.01 ▼1,246.36
Media Library /wp-admin/upload.php3.30 ▲0.0024.61 ▼4.37

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Custom Fields: Accordion Tab Field
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.93 ▼0.086.52 ▲0.392.63 ▼0.09
Dashboard /wp-admin2,895 ▲346.05 ▼0.16115.36 ▼22.58158.69 ▼7.31
Posts /wp-admin/edit.php2,694 ▲33.24 ▲0.0163.58 ▼2.35137.51 ▼9.00
Add New Post /wp-admin/post-new.php1,655 ▼5520.51 ▼0.09422.83 ▼41.16159.44 ▼8.49
Media Library /wp-admin/upload.php1,695 ▼35.53 ▲0.03137.20 ▼6.96195.75 ▲9.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/acf-accordion/acf-accordion.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-accordion/acf-accordion-v5.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-accordion/acf-accordion-v4.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

acf-accordion/acf-accordion.php Passed 13 tests

The principal PHP file in "Advanced Custom Fields: Accordion Tab Field" v. 1.1.1 is loaded by WordPress automatically on each request
126 characters long description:
An accordion field that lets you group multiple fields under accordion tabs. This makes a long ACF form break down with style.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,790 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PO File151229

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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