78% acf-images-search-and-insert

Code Review | ACF Images Search And Insert

WordPress plugin ACF Images Search And Insert scored78%from 54 tests.

About plugin

  • Plugin page: acf-images-search...
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Apr 1, 2016
  • Latest release: Apr 2, 2016
  • Number of updates: 22
  • Update frequency: every 0.1 days
  • Top authors: takayukii (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,399 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼19.11ms] Passed 4 tests

Server-side resources used by ACF Images Search And Insert
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.19 ▲2.19
Dashboard /wp-admin3.16 ▼0.1427.26 ▼23.31
Posts /wp-admin/edit.php3.30 ▼0.0632.25 ▼15.28
Add New Post /wp-admin/post-new.php5.54 ▼0.3576.26 ▼30.45
Media Library /wp-admin/upload.php3.25 ▲0.0228.54 ▼7.40
ACF Images Search And Insert /wp-admin/options-general.php?page=aisai_settings3.1526.92

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
aisai_options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for ACF Images Search And Insert
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.80 ▼0.481.79 ▼0.0633.12 ▼11.27
Dashboard /wp-admin2,220 ▲295.58 ▲0.70108.73 ▲8.8041.99 ▲1.81
Posts /wp-admin/edit.php2,103 ▲142.52 ▲0.5238.25 ▲2.4436.31 ▲1.70
Add New Post /wp-admin/post-new.php1,528 ▼923.87 ▲0.72636.68 ▼51.8362.34 ▲13.02
Media Library /wp-admin/upload.php1,408 ▲204.82 ▲0.6499.76 ▼0.7746.33 ▲4.67
ACF Images Search And Insert /wp-admin/options-general.php?page=aisai_settings1,1492.5228.7545.46

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • aisai_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aisai_settings
    • > Notice in wp-content/plugins/acf-images-search-and-insert/acf-images-search-and-insert.php+112
    Undefined index: post_id

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 fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/acf-images-search-and-insert/settings.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/acf-images-search-and-insert/acf-images-search-and-insert.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Search result in WP Media modal) image not found
You can look at the official readme.txt

acf-images-search-and-insert/acf-images-search-and-insert.php 85% from 13 tests

The primary PHP file in "ACF Images Search And Insert" version 1.1.4 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 183 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin445 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP257128359
PO File1202266
JavaScript203819
CSS1011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity21.00
▷ Minimum class complexity19.00
▷ Maximum class complexity23.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions00.00%
▷ Anonymous functions9100.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.47MB with 0.33MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png481.29KB141.84KB▼ 70.53%