10% auto-image-alt

Code Review | Auto Image Alt Attribute

WordPress plugin Auto Image Alt Attribute scored 10% from 54 tests.

About plugin

  • Plugin page: auto-image-alt
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.2
  • WordPress version: 5.8.1
  • First release: Mar 16, 2017
  • Latest release: May 15, 2019
  • Number of updates: 9
  • Update frequency: every 87.3 days
  • Top authors: jaggskrist (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

10,000+ active / 32,631 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/auto-image-alt/auto-image-alt.php+26
    Trying to access array offset on value of type bool

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

An overview of server-side resources used by Auto Image Alt Attribute
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1336.13 ▲13.79
Dashboard /wp-admin3.07 ▲0.0246.95 ▲4.32
Posts /wp-admin/edit.php3.13 ▲0.0245.82 ▲0.36
Add New Post /wp-admin/post-new.php5.43 ▼0.0087.60 ▼571.94
Media Library /wp-admin/upload.php3.02 ▲0.0233.78 ▲1.69

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 1 new option
New WordPress options
auto_image_alt

Browser metrics Passed 4 tests

A check of browser resources used by Auto Image Alt Attribute
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,809 ▲21316.73 ▲1.2016.90 ▲6.6046.47 ▼4.34
Dashboard /wp-admin2,987 ▲535.92 ▼0.07136.04 ▼19.90107.51 ▲0.47
Posts /wp-admin/edit.php2,759 ▲202.72 ▲0.0266.62 ▼1.6788.23 ▲2.77
Add New Post /wp-admin/post-new.php1,696 ▲1318.76 ▲0.05400.69 ▼0.02108.10 ▲2.96
Media Library /wp-admin/upload.php1,827 ▲175.04 ▲0.01148.45 ▲0.52118.06 ▼0.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 1 option in the database
    • auto_image_alt

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt might help

auto-image-alt/auto-image-alt.php Passed 13 tests

The main PHP script in "Auto Image Alt Attribute" version 1.2 is automatically included on every request by WordPress
96 characters long description:
Adds automatically alt attributes in image tag where alt attributes are missing or alt is empty.

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 detected135 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP219119
JavaScript10016

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected