90% add-class-to-elementor-image

Code Review | Add class to Elementor Image

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

About plugin

  • Plugin page: add-class-to-elem...
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Jun 16, 2021
  • Latest release: Oct 17, 2023
  • Number of updates: 19
  • Update frequency: every 44.8 days
  • Top authors: evcode (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /6,492 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: ▼1.98ms] Passed 4 tests

An overview of server-side resources used by Add class to Elementor Image
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.20 ▲0.83
Dashboard /wp-admin3.32 ▲0.0144.89 ▼2.64
Posts /wp-admin/edit.php3.37 ▲0.0144.16 ▼3.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.62 ▲0.56
Media Library /wp-admin/upload.php3.25 ▲0.0133.88 ▼2.55

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Add class to Elementor Image: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.191.65 ▲0.0138.68 ▼3.13
Dashboard /wp-admin2,195 ▲185.63 ▲0.0482.17 ▼0.4141.14 ▼0.43
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0332.81 ▼10.5633.90 ▼0.57
Add New Post /wp-admin/post-new.php1,535 ▲418.29 ▼4.66582.49 ▼76.3770.10 ▲11.28
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0194.22 ▼27.4745.15 ▲0.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: lazy load, elementor pro, elementor, custom class, image class

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

This is the main PHP file of "Add class to Elementor Image" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin60 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22311560

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
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

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