89% auto-update-image-attributes-from-filename

Code Review | Auto Update Image Attributes From Filename

WordPress plugin Auto Update Image Attributes From Filename scored89%from 54 tests.

About plugin

  • Plugin page: auto-update-image...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2023
  • Latest release: Jun 13, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: thechetanvaghela (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /90 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▲1.21ms] Passed 4 tests

Analyzing server-side resources used by Auto Update Image Attributes From Filename
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0940.13 ▲0.08
Dashboard /wp-admin3.39 ▲0.0952.09 ▲4.10
Posts /wp-admin/edit.php3.51 ▲0.1552.11 ▲3.85
Add New Post /wp-admin/post-new.php5.99 ▲0.1196.76 ▼3.19
Media Library /wp-admin/upload.php3.32 ▲0.0938.96 ▲6.35

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
auiaff-remove-numbers
auiaff-remove-spaces
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
auiaff-enable-auto-update-attributes
auiaff-remove-characters

Browser metrics Passed 4 tests

A check of browser resources used by Auto Update Image Attributes From Filename
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲10613.39 ▼0.987.61 ▲5.8645.01 ▲2.35
Dashboard /wp-admin2,218 ▲385.65 ▲0.0091.47 ▼0.5143.47 ▲0.57
Posts /wp-admin/edit.php2,117 ▲171.98 ▼0.0140.09 ▲1.2638.10 ▼1.66
Add New Post /wp-admin/post-new.php1,552 ▲1718.33 ▲0.38671.64 ▲11.7170.86 ▼2.43
Media Library /wp-admin/upload.php1,420 ▲234.12 ▼0.12111.05 ▲8.0146.72 ▲2.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 10 options in the database
    • auiaff-enable-auto-update-attributes
    • theysaidso_admin_options
    • auiaff-remove-spaces
    • auiaff-remove-characters
    • db_upgraded
    • auiaff-remove-numbers
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: image title, image attributes, image description, image alt, image caption

auto-update-image-attributes-from-filename/auto-update-image-attributes-from-filename.php 85% from 13 tests

The principal PHP file in "Auto Update Image Attributes From Filename" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.0" instead of "7.2")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.1" instead of "6.2.2")

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
No dangerous file extensions were detected353 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12131573347
JavaScript24546
CSS2080

PHP code Passed 2 tests

An short overview of 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.28
Average class complexity6.43
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected