84% alt-for-images

Code Review | ALT for images

WordPress plugin ALT for images scored84%from 54 tests.

About plugin

  • Plugin page: alt-for-images
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 22, 2012
  • Latest release: Nov 22, 2012
  • Number of updates: 10
  • Update frequency: every 22.9 days
  • Top authors: TrueFalse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,451 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.30ms] Passed 4 tests

Analyzing server-side resources used by ALT for images
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.08 ▼1.03
Dashboard /wp-admin3.31 ▲0.0156.76 ▲5.92
Posts /wp-admin/edit.php3.36 ▲0.0047.17 ▼0.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.05 ▼16.95
Media Library /wp-admin/upload.php3.23 ▲0.0035.71 ▲0.80

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by ALT for images
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.19 ▼1.111.72 ▼0.3242.24 ▼0.72
Dashboard /wp-admin2,200 ▲125.79 ▲0.92105.16 ▼12.4140.39 ▼2.77
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0237.71 ▼2.4233.18 ▼1.08
Add New Post /wp-admin/post-new.php1,533 ▲523.23 ▲5.17667.75 ▲32.4364.52 ▲11.68
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.01101.19 ▼1.1343.27 ▼2.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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 no errors were found, 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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/alt-for-images/afi.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: html, image, seo, images, posts...

alt-for-images/afi.php 92% from 13 tests

Analyzing the main PHP file in "ALT for images" version 1.0
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("alt-for-images.php" instead of "afi.php")

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
Success! There were no dangerous files found in this plugin8 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22118

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected