67% auto-image-field

Code Review | Auto Image Field

WordPress plugin Auto Image Field scored67%from 54 tests.

About plugin

  • Plugin page: auto-image-field
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Jan 7, 2010
  • Latest release: Jun 23, 2014
  • Number of updates: 11
  • Update frequency: every 148.0 days
  • Top authors: anduriell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,054 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.88MB] [CPU: ▼35.91ms] Passed 4 tests

This is a short check of server-side resources used by Auto Image Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.44 ▼2.28
Dashboard /wp-admin3.06 ▼0.2427.67 ▼25.75
Posts /wp-admin/edit.php3.06 ▼0.2924.98 ▼28.95
Add New Post /wp-admin/post-new.php3.06 ▼2.8228.43 ▼73.32
Media Library /wp-admin/upload.php3.06 ▼0.1721.04 ▼15.63
AutoImageField /wp-admin/options-general.php?page=auto-image-field/auto-image-field.php3.0624.60

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: 1 new table, 6 new options
New tables
wp_and_imagefields
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Auto Image Field
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.72 ▲0.091.75 ▼0.1544.96 ▲2.62
Dashboard /wp-admin2,201 ▲375.57 ▲0.0388.82 ▼22.4741.09 ▼1.03
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0738.04 ▼3.4236.84 ▼1.99
Add New Post /wp-admin/post-new.php1,540 ▲1418.04 ▼5.52631.14 ▼50.6168.51 ▲18.11
Media Library /wp-admin/upload.php1,406 ▲64.18 ▲0.0195.09 ▼5.8043.14 ▼3.08
AutoImageField /wp-admin/options-general.php?page=auto-image-field/auto-image-field.php8531.9924.7227.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check 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=auto-image-field/auto-image-field.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=auto-image-field/auto-image-field.php
    • > Notice in wp-content/plugins/auto-image-field/auto-image-field.php+330
    Undefined index: mode
    • > GET request to /wp-admin/options-general.php?page=auto-image-field/auto-image-field.php
    • > Notice in wp-content/plugins/auto-image-field/auto-image-field.php+334
    Undefined variable: messages
    • > GET request to /wp-admin/options-general.php?page=auto-image-field/auto-image-field.php
    • > Warning in wp-content/plugins/auto-image-field/auto-image-field.php+334
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/options-general.php?page=auto-image-field/auto-image-field.php
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/options-general.php?page=auto-image-field/auto-image-field.php
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=auto-image-field/auto-image-field.php
    • > Notice in wp-content/plugins/auto-image-field/auto-image-field.php+423
    Undefined variable: id

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/auto-image-field/auto-image-field.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: ": http://arturoemilio.es"
  • Plugin Name: You should set the name of your plugin on the first line ( === auto-image-field === )
  • Screenshots: Add a description for screenshot #0 in auto-image-field/assets to your readme.txt
  • Screenshots: Screenshot #3 (Meta Box in new entry) image required
The official readme.txt is a good inspiration

auto-image-field/auto-image-field.php 92% from 13 tests

Analyzing the main PHP file in "Auto Image Field" version 2.0
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 264 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin347 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15049347

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.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
No PNG files were detected