84% enlightenedimages

Code Review | Enlightened Images Alt Text Generator

WordPress plugin Enlightened Images Alt Text Generator scored84%from 54 tests.

About plugin

  • Plugin page: enlightenedimages
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1.0-6.0
  • WordPress version: 6.3.1
  • First release: Apr 3, 2022
  • Latest release: Jul 1, 2022
  • Number of updates: 21
  • Update frequency: every 4.4 days
  • Top authors: bcupham (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,194 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
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼4.04ms] Passed 4 tests

This is a short check of server-side resources used by Enlightened Images Alt Text Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1243.59 ▼0.64
Dashboard /wp-admin3.42 ▲0.0859.25 ▼12.10
Posts /wp-admin/edit.php3.53 ▲0.1847.98 ▼4.95
Add New Post /wp-admin/post-new.php6.01 ▲0.1293.24 ▲1.55
Media Library /wp-admin/upload.php3.34 ▲0.1138.38 ▲4.57
Bulk Alt Text /wp-admin/upload.php?page=enlightenedimages3.3133.31

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
elim_pro_plugin

Browser metrics Passed 4 tests

Enlightened Images Alt Text Generator: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.67 ▼0.642.01 ▼0.1447.43 ▼6.81
Dashboard /wp-admin2,218 ▲305.36 ▲0.46123.39 ▼5.0741.00 ▼9.40
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0637.06 ▼10.7235.96 ▼1.97
Add New Post /wp-admin/post-new.php1,536 ▲1723.18 ▲0.13612.55 ▼101.7158.14 ▼15.37
Media Library /wp-admin/upload.php1,395 ▲104.18 ▼0.0294.43 ▼6.6941.39 ▼1.52
Bulk Alt Text /wp-admin/upload.php?page=enlightenedimages8962.7050.9147.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/enlightenedimages/src/class-elim-plugin.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: image alt text, seo, accessibility, alt text

enlightenedimages/enlightened-images.php 92% from 13 tests

The main file in "Enlightened Images Alt Text Generator" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("enlightenedimages.php" instead of "enlightened-images.php")

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 plugin615 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP512322598
JSON10015
CSS1011
JavaScript1021

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity31.00
▷ Minimum class complexity6.00
▷ Maximum class complexity78.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods2291.67%
▷ Protected methods14.17%
▷ Private methods14.17%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected