84% acf-autosize

Code Review | ACF Autosize

WordPress plugin ACF Autosize scored84%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: 6.3.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

20 reviews

Install metrics

4,000+ active /31,822 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by ACF Autosize
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.32 ▼11.03
Dashboard /wp-admin3.32 ▲0.0145.38 ▼5.74
Posts /wp-admin/edit.php3.37 ▲0.0152.87 ▲2.81
Add New Post /wp-admin/post-new.php5.92 ▲0.0289.83 ▼14.27
Media Library /wp-admin/upload.php3.24 ▲0.0135.15 ▼4.59

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by ACF Autosize
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.21 ▼0.521.56 ▼0.1542.49 ▲0.87
Dashboard /wp-admin2,196 ▲195.55 ▼0.0885.39 ▼12.8937.91 ▼7.73
Posts /wp-admin/edit.php2,110 ▲102.03 ▼0.0139.26 ▲0.5636.99 ▼0.80
Add New Post /wp-admin/post-new.php1,533 ▲723.30 ▲0.20670.70 ▼25.3756.97 ▲3.34
Media Library /wp-admin/upload.php1,401 ▲44.19 ▲0.02101.51 ▼3.2043.10 ▼2.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors 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 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: wysiwyg, autosize, acf, autoresize

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 considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected11,953 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
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
public/assets/banner-1544x500.png8.84KB3.29KB▼ 62.77%
public/assets/banner-772x250.png3.48KB1.43KB▼ 58.95%
src/assets/banner-1544x500.png8.84KB3.29KB▼ 62.77%
src/assets/banner-772x250.png3.48KB1.43KB▼ 58.95%