100% acf-image-size-select

Code Review | Advanced Custom Fields: Image Size Select Field

WordPress plugin Advanced Custom Fields: Image Size Select Field scored 100% from 54 tests.

About plugin

  • Plugin page: acf-image-size-se...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-5.9
  • WordPress version: 5.9.2
  • First release: Nov 30, 2018
  • Latest release: Jan 30, 2022
  • Number of updates: 22
  • Update frequency: every 52.6 days
  • Top authors: jeremyrwross (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 1,715 total downloads

Benchmarks

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 gracefully, with no errors

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

A check of server-side resources used by Advanced Custom Fields: Image Size Select Field
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.26 ▲3.70
Dashboard /wp-admin3.41 ▲0.0133.59 ▼1.03
Posts /wp-admin/edit.php3.65 ▲0.0138.98 ▲3.13
Add New Post /wp-admin/post-new.php6.89 ▼0.08104.85 ▼1,165.19
Media Library /wp-admin/upload.php3.30 ▼0.0024.93 ▼4.49

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Custom Fields: Image Size Select Field
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.83 ▲0.135.73 ▼1.412.18 ▼0.71
Dashboard /wp-admin2,888 ▲276.10 ▼0.06115.52 ▼20.09150.72 ▼7.29
Posts /wp-admin/edit.php2,691 ▼33.24 ▲0.0160.74 ▼1.78131.59 ▼8.80
Add New Post /wp-admin/post-new.php1,758 ▲4121.27 ▲0.06443.82 ▲39.65156.93 ▼2.06
Media Library /wp-admin/upload.php1,701 ▲35.54 ▲0.03141.70 ▲4.35182.99 ▼10.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: image size, acf, advanced custom fields

acf-image-size-select/acf-image-size-select.php Passed 13 tests

"Advanced Custom Fields: Image Size Select Field" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
70 characters long description:
Field to select registered image sizes within the WordPress dashboard.

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
No dangerous file extensions were detected161 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36865161

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity10.50
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
PNG images were not found in this plugin