94% acf-autosize

Code Review | ACF Autosize

WordPress plugin ACF Autosize scored 94% from 54 tests.

About plugin

  • Plugin page: acf-autosize
  • Plugin version: 2.0.15
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-5.9
  • WordPress version: 5.8.1
  • First release: Jun 21, 2018
  • Latest release: Jan 28, 2022
  • Number of updates: 66
  • Update frequency: every 20.0 days
  • Top authors: yeah8000 (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

3,000+ active / 23,138 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by ACF Autosize
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0133.12 ▲8.66
Dashboard /wp-admin3.06 ▲0.0034.70 ▼13.56
Posts /wp-admin/edit.php3.15 ▲0.0434.77 ▼0.74
Add New Post /wp-admin/post-new.php5.42 ▼0.0276.17 ▼587.98
Media Library /wp-admin/upload.php3.01 ▲0.0022.93 ▼1.69

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for ACF Autosize
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,676 ▲7515.93 ▲0.244.91 ▼4.3973.36 ▼1.62
Dashboard /wp-admin2,939 ▲436.02 ▼0.17113.60 ▼16.19171.30 ▼2.49
Posts /wp-admin/edit.php2,750 ▲103.24 ▲0.0262.06 ▼2.16140.56 ▲4.45
Add New Post /wp-admin/post-new.php3,772 ▼3518.58 ▲0.75417.44 ▼74.26153.76 ▼12.79
Media Library /wp-admin/upload.php1,762 ▲135.55 ▲0.08144.65 ▲8.25182.40 ▼3.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function YeahACFAutosize\\add_action() in wp-content/plugins/acf-autosize/acf-autosize.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration Passed 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
4 plugin tags: autoresize, wysiwyg, acf, autosize

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

The primary PHP file in "ACF Autosize" version 2.0.15 is used by WordPress to initiate all plugin functionality
114 characters long description:
A wordpress plugin to automatically resize and improve upon wysiwyg and textarea fields in Advanced Custom Fields.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin11,953 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/assets/banner-1544x500.png8.84KB3.29KB▼ 62.77%
public/assets/banner-772x250.png3.48KB1.43KB▼ 58.95%
public/assets/banner-1544x500.png8.84KB3.29KB▼ 62.77%
src/assets/banner-772x250.png3.48KB1.43KB▼ 58.95%