84% auto-add-image-attributes

Code Review | Auto Add Image Attributes

WordPress plugin Auto Add Image Attributes scored 84% from 54 tests.

About plugin

  • Plugin page: auto-add-image-at...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7
  • WordPress version: 6.3.1
  • First release: Jun 14, 2017
  • Latest release: Jun 14, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: srjlulla (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 816 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.60ms] Passed 4 tests

Analyzing server-side resources used by Auto Add Image Attributes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.37 ▼2.51
Dashboard /wp-admin3.31 ▲0.0144.38 ▼6.21
Posts /wp-admin/edit.php3.36 ▲0.0146.53 ▲2.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.56 ▼1.62
Media Library /wp-admin/upload.php3.23 ▲0.0034.32 ▼0.04

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Auto Add Image Attributes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.63 ▼0.791.64 ▼0.8644.11 ▼8.33
Dashboard /wp-admin2,206 ▲215.84 ▼0.0594.76 ▼20.0637.98 ▼3.58
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0134.17 ▼2.8034.52 ▲1.68
Add New Post /wp-admin/post-new.php1,519 ▼2323.26 ▲5.15685.61 ▲68.7964.79 ▲4.79
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0295.67 ▼6.8443.51 ▼0.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-add-image-attributes/auto-add-image-attributes.php:26

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: auto add image caption, add image caption from file name, image auto caption, image auto description, add image attributes

auto-add-image-attributes/auto-add-image-attributes.php Passed 13 tests

The main PHP file in "Auto Add Image Attributes" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
116 characters long description:
Automatically add image's Title, Caption, Alt Text and Description from image's filename with this WordPress plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected15 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14915

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
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

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