83% alttextmagic

Code Review | Alt Text Magic - Generate descriptive alt text (alt attribute, alt tag) for accessibility and SEO optimization

WordPress plugin Alt Text Magic - Generate descriptive alt text (alt attribute, alt tag) for accessibility and SEO optimization scored83%from 54 tests.

About plugin

  • Plugin page: alttextmagic
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2022
  • Latest release: Mar 8, 2023
  • Number of updates: 11
  • Update frequency: every 20.8 days
  • Top authors: minegapai (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /1,401 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
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.16ms] Passed 4 tests

A check of server-side resources used by Alt Text Magic - Generate descriptive alt text (alt attribute, alt tag) for accessibility and SEO optimization
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1545.85 ▲0.51
Dashboard /wp-admin3.45 ▲0.1156.01 ▼15.10
Posts /wp-admin/edit.php3.56 ▲0.2155.17 ▲4.63
Add New Post /wp-admin/post-new.php6.02 ▲0.1490.38 ▼10.67
Media Library /wp-admin/upload.php3.37 ▲0.1544.89 ▲6.61

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 20 new options
New WordPress options
can_compress_scripts
alt_text_magic_image_credit_limit
alt_text_magic_images_missing_alt_text
widget_recent-posts
db_upgraded
alt_text_magic_language
alt_text_magic_batch_current_idx
alt_text_magic_image_credit_count
widget_theysaidso_widget
alt_text_magic_monthly_image_count
...

Browser metrics Passed 4 tests

An overview of browser requirements for Alt Text Magic - Generate descriptive alt text (alt attribute, alt tag) for accessibility and SEO optimization
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.20 ▼0.381.69 ▼0.1845.30 ▼0.12
Dashboard /wp-admin2,210 ▲305.69 ▼0.0192.21 ▼9.3966.99 ▲22.38
Posts /wp-admin/edit.php2,121 ▲211.97 ▼0.0437.81 ▼2.1035.91 ▲1.66
Add New Post /wp-admin/post-new.php1,553 ▲2523.02 ▼0.29747.15 ▲93.2951.92 ▼8.58
Media Library /wp-admin/upload.php1,422 ▲224.19 ▲0.03102.60 ▲2.3678.99 ▲34.93

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/alttextmagic/includes/dashboard.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/alttextmagic/includes/library_updater.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/alttextmagic/includes/account.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/alttextmagic/plugin.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 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
8 plugin tags: alt text, machine learning, accessibility, ai, generator...

alttextmagic/plugin.php 62% from 13 tests

The main PHP file in "Alt Text Magic - Generate descriptive alt text (alt attribute, alt tag) for accessibility and SEO optimization" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.2" instead of "4.2.0")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "7.2")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("alttextmagic.php" instead of "plugin.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,801 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61894061,176
PHP51052581,057
CSS31109568

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/chicken-icon-gr.png2.42KB0.48KB▼ 80.11%
assets/chicken-icon.png2.39KB0.56KB▼ 76.43%
assets/Alt-Text-Magic-logo.png35.98KB19.27KB▼ 46.43%