73% fix-alt-text

Code Review | Fix Alt Text

WordPress plugin Fix Alt Text scored73%from 54 tests.

About plugin

  • Plugin page: fix-alt-text
  • Plugin version: 1.6.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2022
  • Latest release: Sep 21, 2023
  • Number of updates: 43
  • Update frequency: every 13.8 days
  • Top authors: stevenayers63 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /7,912 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.29MB] [CPU: ▼1.25ms] Passed 4 tests

A check of server-side resources used by Fix Alt Text
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.52 ▲1.0644.50 ▲3.07
Dashboard /wp-admin4.70 ▲1.4053.90 ▲4.19
Posts /wp-admin/edit.php4.75 ▲1.4053.54 ▼2.26
Add New Post /wp-admin/post-new.php7.24 ▲1.3689.96 ▼10.00
Media Library /wp-admin/upload.php4.56 ▲1.3443.65 ▲10.40
Fix Alt Text /wp-admin/tools.php?page=fix-alt-text4.6242.17

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 88 new files
Database: 1 new table, 6 new options
New tables
wp_fixalttext_images
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Fix Alt Text
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.26 ▼1.031.60 ▼0.4042.99 ▲0.26
Dashboard /wp-admin2,210 ▲194.85 ▼0.1997.07 ▼8.7238.31 ▼5.67
Posts /wp-admin/edit.php2,093 ▲42.13 ▲0.0035.80 ▼4.8433.89 ▼1.69
Add New Post /wp-admin/post-new.php1,550 ▲1618.39 ▼4.88601.46 ▼66.9549.12 ▼5.12
Media Library /wp-admin/upload.php1,395 ▲74.20 ▼0.0497.24 ▼17.5042.99 ▼6.33
Fix Alt Text /wp-admin/tools.php?page=fix-alt-text1,1675.4259.9557.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_fixalttext_images
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

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)
Even though everything seems fine, this is not 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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/fix-alt-text/uninstall.php

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Dashboard: Initial scan is needed), #2 (Site Settings: Overwritten by network settings), #3 (Network Settings: Edit network settings and see scan status of all sites), #4 (Dashboard: Running full scan), #5 (Dashboard: Scan complete. Displaying issues and notifications), #6 (Alt Text: Found references involving alt text), #7 (Alt Text: Preview image and inline editing), #8 (Gutenberg Editor: Forcing Alt Text), #9 (Media Library: Forcing Alt Text)
The official readme.txt is a good inspiration

fix-alt-text/fix-alt-text.php 92% from 13 tests

The principal PHP file in "Fix Alt Text" v. 1.6.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin7,783 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP452,8353,4366,309
CSS21608791
JavaScript8295297682
HTML1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity27.21
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.99
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes33
▷ Abstract classes1339.39%
▷ Concrete classes2060.61%
▷ Final classes1365.00%
Methods307
▷ Static methods17958.31%
▷ Public methods25482.74%
▷ Protected methods4314.01%
▷ Private methods103.26%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants82
▷ Global constants82100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 2.52MB with 1.72MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-7.png537.37KB159.22KB▼ 70.37%
screenshot-4.png111.12KB36.98KB▼ 66.72%
screenshot-8.png980.78KB283.38KB▼ 71.11%
screenshot-3.png129.05KB41.59KB▼ 67.77%
screenshot-1.png126.29KB41.98KB▼ 66.76%