89% acf-default-image-addon

Code Review | Default Image Addon for ACF

WordPress plugin Default Image Addon for ACF scored89%from 54 tests.

About plugin

  • Plugin page: acf-default-image...
  • Plugin version: 1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 23, 2023
  • Latest release: Jan 23, 2023
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: galaxyweblinks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /234 total downloads

Benchmarks

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.00MB] [CPU: ▼8.03ms] Passed 4 tests

Server-side resources used by Default Image Addon for ACF
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.27 ▲3.27
Dashboard /wp-admin3.31 ▲0.0150.64 ▼5.94
Posts /wp-admin/edit.php3.36 ▲0.0047.59 ▼6.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.92 ▼21.09
Media Library /wp-admin/upload.php3.23 ▲0.0038.29 ▲1.19

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Default Image Addon for ACF
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.31 ▼0.281.84 ▼0.0146.01 ▲5.97
Dashboard /wp-admin2,189 ▲95.54 ▼0.1286.11 ▼3.8439.88 ▼5.52
Posts /wp-admin/edit.php2,100 ▲32.01 ▼0.0032.99 ▼3.6435.75 ▲0.71
Add New Post /wp-admin/post-new.php1,545 ▲1423.44 ▲0.38681.09 ▼1.8359.51 ▲0.08
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.0195.55 ▼4.1743.25 ▼1.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Backend Image option) image not found
The official readme.txt might help

acf-default-image-addon/default-image-addon-for-acf.php 85% from 13 tests

Analyzing the main PHP file in "Default Image Addon for ACF" version 1.0
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("acf-default-image-addon.php" instead of "default-image-addon-for-acf.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
No dangerous file extensions were detected25 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP242425

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.83
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
1 PNG file occupies 0.14MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png139.11KB41.09KB▼ 70.46%