84% image-automatic-alt-text-and-caption

Code Review | Image Automatic Alt Text and Caption

WordPress plugin Image Automatic Alt Text and Caption scored84%from 54 tests.

About plugin

  • Plugin page: image-automatic-a...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0.3
  • WordPress version: 6.3.1
  • First release: Jan 15, 2019
  • Latest release: Jan 15, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: natekinkead (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,037 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.01MB] [CPU: ▼6.18ms] Passed 4 tests

This is a short check of server-side resources used by Image Automatic Alt Text and Caption
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.34 ▲5.21
Dashboard /wp-admin3.31 ▲0.0145.68 ▼6.42
Posts /wp-admin/edit.php3.36 ▲0.0147.12 ▼3.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.09 ▼14.49
Media Library /wp-admin/upload.php3.24 ▲0.0133.95 ▼0.33

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Image Automatic Alt Text and Caption
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.20 ▼1.191.89 ▼0.9844.31 ▼1.01
Dashboard /wp-admin2,206 ▲185.77 ▲0.8595.68 ▼10.4041.10 ▼4.56
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0040.96 ▼2.1134.26 ▼4.10
Add New Post /wp-admin/post-new.php1,544 ▲1618.46 ▲0.36591.48 ▼19.7452.59 ▲1.71
Media Library /wp-admin/upload.php1,385 ▼34.22 ▼0.0194.00 ▼10.5942.12 ▼2.37

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-automatic-alt-text-and-caption/image-automatic-alt-text-and-caption.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: media, img, alt, caption, image...

image-automatic-alt-text-and-caption/image-automatic-alt-text-and-caption.php Passed 13 tests

The main file in "Image Automatic Alt Text and Caption" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
67 characters long description:
Automatically generates alt text and caption for new image uploads.

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
No dangerous file extensions were detected29 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP272029

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions3
▷ Named functions3100.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
PNG images were not found in this plugin