78% alt-tags-for-images

Code Review | Alt Tags for Images

WordPress plugin Alt Tags for Images scored78%from 54 tests.

About plugin

  • Plugin page: alt-tags-for-images
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Mar 5, 2017
  • Latest release: Mar 5, 2017
  • Number of updates: 11
  • Update frequency: every 0.1 days
  • Top authors: cnckevin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,170 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.15ms] Passed 4 tests

Analyzing server-side resources used by Alt Tags for Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0542.97 ▼2.04
Dashboard /wp-admin3.35 ▲0.0550.93 ▼9.38
Posts /wp-admin/edit.php3.46 ▲0.1148.35 ▼3.19
Add New Post /wp-admin/post-new.php5.95 ▲0.0799.55 ▼10.00
Media Library /wp-admin/upload.php3.27 ▲0.0539.87 ▲1.64

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Alt Tags for Images: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲9013.80 ▼0.558.87 ▲6.8542.01 ▼1.41
Dashboard /wp-admin2,202 ▲255.57 ▼0.0886.87 ▼3.1944.61 ▲0.33
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0237.93 ▲0.5237.70 ▲0.88
Add New Post /wp-admin/post-new.php1,530 ▼523.62 ▲5.14678.63 ▲4.2257.63 ▼18.51
Media Library /wp-admin/upload.php1,398 ▼24.26 ▲0.10100.83 ▼4.7444.33 ▲1.84

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/alt-tags-for-images/admin/partials/cnc-image-alt-tags-admin-display.php
    • > /wp-content/plugins/alt-tags-for-images/public/partials/cnc-image-alt-tags-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/alt-tags-for-images/public/class-cnc-image-alt-tags-public.php:126

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


Plugin configuration 93% 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
3 plugin tags: alt tags, mising alt tags, images

alt-tags-for-images/cnc-image-alt-tags.php 85% from 13 tests

Analyzing the main PHP file in "Alt Tags for Images" version 1.0.0
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("alt-tags-for-images.php" instead of "cnc-image-alt-tags.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin232 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity1.29
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.09
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ 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
No PNG images were found in this plugin