90% nelio-compare-images

Code Review | Nelio Compare Images

WordPress plugin Nelio Compare Images scored90%from 54 tests.

About plugin

  • Plugin page: nelio-compare-images
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Sep 27, 2019
  • Latest release: Nov 20, 2023
  • Number of updates: 11
  • Update frequency: every 137.7 days
  • Top authors: davilera (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /3,973 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by Nelio Compare Images
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.71 ▼3.34
Dashboard /wp-admin3.33 ▲0.0246.87 ▼0.26
Posts /wp-admin/edit.php3.38 ▲0.0247.51 ▼5.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.24 ▼1.36
Media Library /wp-admin/upload.php3.25 ▲0.0235.39 ▲4.30

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Nelio Compare Images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4614.18 ▼0.161.56 ▼0.1341.37 ▼2.25
Dashboard /wp-admin2,195 ▲185.58 ▼0.0589.51 ▼9.3340.88 ▼0.17
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0339.24 ▼1.1237.97 ▲2.55
Add New Post /wp-admin/post-new.php6,366 ▲4,84027.65 ▲4.41898.46 ▲235.8756.30 ▼3.61
Media Library /wp-admin/upload.php1,403 ▲34.18 ▲0.0195.21 ▼1.9142.99 ▼0.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: gutenberg block, after image, before image, image comparison, compare images

nelio-compare-images/nelio-compare-images.php Passed 13 tests

The main PHP file in "Nelio Compare Images" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
41 characters long description:
Before & After Image Block for Gutenberg.

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
There were no executable files found in this plugin94 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JSON10072
PHP452118
CSS2002
JavaScript2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin