94% advanced-custom-field-repeater-collapser

Code Review | Advanced Custom Fields Repeater & Flexible Content Fields Collapser

WordPress plugin Advanced Custom Fields Repeater & Flexible Content Fields Collapser scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.3
  • WordPress version: 5.8.1
  • First release: Apr 7, 2013
  • Latest release: May 15, 2017
  • Number of updates: 38
  • Update frequency: every 39.5 days
  • Top authors: mrwweb (97.37%)aaronrutley (5.26%)

Code review

54 tests

User reviews

14 reviews

Install metrics

9,000+ active / 87,790 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Advanced Custom Fields Repeater & Flexible Content Fields Collapser
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1345.98 ▲13.47
Dashboard /wp-admin3.07 ▲0.0151.44 ▲0.87
Posts /wp-admin/edit.php3.12 ▲0.0150.63 ▲1.14
Add New Post /wp-admin/post-new.php5.43 ▼0.0196.29 ▼581.70
Media Library /wp-admin/upload.php3.01 ▲0.0131.19 ▼6.58

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields Repeater & Flexible Content Fields Collapser
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.94 ▲0.4212.67 ▲0.6446.75 ▼3.33
Dashboard /wp-admin2,967 ▲365.88 ▼0.05143.88 ▼17.00110.24 ▼7.53
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0066.55 ▼5.12100.69 ▲0.17
Add New Post /wp-admin/post-new.php1,683 ▼018.82 ▲0.06378.68 ▼27.59115.91 ▼10.12
Media Library /wp-admin/upload.php1,807 ▼05.05 ▼0.00160.01 ▼8.95125.49 ▼0.99

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 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/advanced-custom-field-repeater-collapser/acf_repeater_collapser.php:17

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: acf, repeater, advanced custom fields

advanced-custom-field-repeater-collapser/acf_repeater_collapser.php 92% from 13 tests

Analyzing the main PHP file in "Advanced Custom Fields Repeater & Flexible Content Fields Collapser" version 1.5.0
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-custom-field-repeater-collapser.php" instead of "acf_repeater_collapser.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin464 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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 functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.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
2 compressed PNG files occupy 0.04MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings