100% add-class-to-elementor-image

Code Review | Add class to Elementor Image

WordPress plugin Add class to Elementor Image scored 100% from 54 tests.

About plugin

  • Plugin page: add-class-to-elem...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8
  • WordPress version: 5.8.1
  • First release: Jun 16, 2021
  • Latest release: Jan 15, 2022
  • Number of updates: 15
  • Update frequency: every 14.1 days
  • Top authors: evcode (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 921 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Add class to Elementor Image
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0126.65 ▲0.43
Dashboard /wp-admin3.07 ▲0.0134.59 ▼9.69
Posts /wp-admin/edit.php3.12 ▲0.0134.76 ▼0.46
Add New Post /wp-admin/post-new.php5.43 ▼0.0175.98 ▼578.62
Media Library /wp-admin/upload.php3.02 ▲0.0125.01 ▼2.11

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Add class to Elementor Image
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲5515.96 ▲0.905.12 ▼0.3575.38 ▲1.62
Dashboard /wp-admin2,930 ▲346.15 ▼0.01113.61 ▼15.63163.72 ▼9.26
Posts /wp-admin/edit.php2,740 ▼03.22 ▲0.0062.41 ▲1.95133.02 ▼2.86
Add New Post /wp-admin/post-new.php3,736 ▼7818.43 ▼0.65419.15 ▼43.34164.72 ▲1.42
Media Library /wp-admin/upload.php1,752 ▼05.49 ▲0.00144.33 ▲9.03190.29 ▲4.39

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 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
5 plugin tags: elementor, elementor pro, custom class, lazy load, image class

add-class-to-elementor-image/add-class-to-elementor-image.php Passed 13 tests

The main file in "Add class to Elementor Image" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
57 characters long description:
Simple plugin to add custom CSS class to Elementor image.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin75 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2239851
Markdown117024

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods6
▷ Static methods116.67%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
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
PNG images were not found in this plugin