84% automatic-alternative-text

Code Review | Automatic Alternative Text

WordPress plugin Automatic Alternative Text scored84%from 54 tests.

About plugin

  • Plugin page: automatic-alterna...
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2.1
  • WordPress version: 6.3.1
  • First release: Aug 21, 2016
  • Latest release: Jul 1, 2019
  • Number of updates: 24
  • Update frequency: every 43.5 days
  • Top authors: JakePT (83.33%)deployer (20.83%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /9,069 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.32ms] Passed 4 tests

An overview of server-side resources used by Automatic Alternative Text
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0443.01 ▼0.89
Dashboard /wp-admin3.35 ▲0.0450.30 ▼5.97
Posts /wp-admin/edit.php3.40 ▲0.0450.20 ▼0.22
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.69 ▼14.00
Media Library /wp-admin/upload.php3.27 ▲0.0439.31 ▼4.41

Server storage [IO: ▲0.01MB] [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, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
aat_confidence

Browser metrics Passed 4 tests

Checking browser requirements for Automatic Alternative Text
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.58 ▲0.231.75 ▲0.0446.42 ▲2.30
Dashboard /wp-admin2,218 ▲415.63 ▼0.0284.44 ▼3.6341.68 ▼0.22
Posts /wp-admin/edit.php2,124 ▲212.03 ▲0.0537.42 ▲1.2031.01 ▼2.88
Add New Post /wp-admin/post-new.php1,422 ▼10417.96 ▼5.10606.23 ▼111.0939.62 ▼21.91
Media Library /wp-admin/upload.php1,417 ▲174.21 ▲0.05102.45 ▼7.1145.98 ▲1.37

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 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • aat_confidence
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
  • 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/automatic-alternative-text/automatic-alternative-text.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

automatic-alternative-text/automatic-alternative-text.php Passed 13 tests

The main file in "Automatic Alternative Text" v. 1.1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
99 characters long description:
Automatically generate alt text for images with Microsoft's Cognitive Services Computer Vision API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin161 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP137104161

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin