10% image-alt-editor

Code Review | Image Alt Editor

WordPress plugin Image Alt Editor scored 10% from 54 tests.

About plugin

  • Plugin page: image-alt-editor
  • Plugin version: 1.02
  • PHP compatiblity: 7.3.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Jun 8, 2021
  • Latest release: Apr 20, 2023
  • Number of updates: 7
  • Update frequency: every 97.3 days
  • Top authors: leofontin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 1,328 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.84ms] Passed 4 tests

Analyzing server-side resources used by Image Alt Editor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.94 ▼3.64
Dashboard /wp-admin3.31 ▲0.0048.62 ▲1.61
Posts /wp-admin/edit.php3.36 ▲0.0046.74 ▼5.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.34 ▼1.62
Media Library /wp-admin/upload.php3.23 ▲0.0033.80 ▼0.70

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Image Alt Editor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.27 ▼1.132.04 ▲0.0743.52 ▼7.34
Dashboard /wp-admin2,206 ▲215.86 ▼0.04104.34 ▼2.1041.62 ▼7.48
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0035.45 ▼5.7234.35 ▼0.18
Add New Post /wp-admin/post-new.php1,534 ▲2122.99 ▲5.51634.41 ▲28.5862.28 ▲17.82
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.0298.98 ▲4.1743.38 ▲1.64

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/image-alt-editor/activate-deactivate.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/image-alt-editor/image-alt-editor.php:21

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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: image alt attribute, image alt, seo, alt, quick edit alt...

image-alt-editor/image-alt-editor.php 85% from 13 tests

The primary PHP file in "Image Alt Editor" version 1.02 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: The domain path must begin with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin475 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4124192280
JavaScript1511121
CSS121074

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.50
▷ Minimum class complexity4.00
▷ Maximum class complexity13.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods26
▷ Static methods415.38%
▷ Public methods2388.46%
▷ Protected methods00.00%
▷ Private methods311.54%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin