94% advanced-image-comparison-for-elementor

Code Review | Advanced Image Comparison for Elementor

WordPress plugin Advanced Image Comparison for Elementor scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-image-co...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.7.2
  • WordPress version: 5.9.2
  • First release: May 21, 2021
  • Latest release: May 21, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ruhel241 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 204 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼313.37ms] Passed 4 tests

Server-side resources used by Advanced Image Comparison for Elementor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0157.85 ▲10.21
Dashboard /wp-admin3.41 ▲0.0033.40 ▼3.74
Posts /wp-admin/edit.php3.64 ▲0.0135.81 ▼21.84
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.77 ▼1,226.69
Media Library /wp-admin/upload.php3.30 ▲0.0023.07 ▼1.20

Server storage [IO: ▲0.06MB] [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: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Image Comparison for Elementor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,809 ▲5516.18 ▲0.195.59 ▼0.342.57 ▲0.04
Dashboard /wp-admin2,926 ▲696.01 ▼0.11155.22 ▲28.61177.10 ▲5.53
Posts /wp-admin/edit.php2,713 ▲253.24 ▲0.0063.75 ▼0.36211.76 ▲71.51
Add New Post /wp-admin/post-new.php1,678 ▼3316.28 ▼5.10428.28 ▼41.55166.64 ▼15.02
Media Library /wp-admin/upload.php1,718 ▲205.53 ▼0.03176.12 ▲35.69190.86 ▼4.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/advanced-image-comparison-for-elementor/widgets/AICImageComparisonWidget.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Requires php: Invalid version format
You can take inspiration from this readme.txt

advanced-image-comparison-for-elementor/advanced-image-comparison-for-elementor.php 92% from 13 tests

The primary PHP file in "Advanced Image Comparison for Elementor" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 plugin797 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP277186745
JSON20040
JavaScript41010
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity5.50
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods17
▷ Static methods15.88%
▷ Public methods1588.24%
▷ Protected methods211.76%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin