83% image-compare-block

Code Review | Image Comparison Gutenberg Block

WordPress plugin Image Comparison Gutenberg Block scored83%from 54 tests.

About plugin

  • Plugin page: image-compare-block
  • Plugin version: 1.5.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 1, 2021
  • Latest release: Nov 11, 2023
  • Number of updates: 6
  • Update frequency: every 128.7 days
  • Top authors: binsaifullah (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /2,237 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.02MB] [CPU: ▼4.88ms] Passed 4 tests

This is a short check of server-side resources used by Image Comparison Gutenberg Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0342.67 ▲3.52
Dashboard /wp-admin3.33 ▲0.0246.28 ▼2.79
Posts /wp-admin/edit.php3.38 ▲0.0242.10 ▼7.84
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.36 ▼8.36
Media Library /wp-admin/upload.php3.25 ▲0.0233.26 ▼0.51
Image Compare /wp-admin/tools.php?page=icgb-image-compare3.2229.68

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Image Comparison Gutenberg Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲1614.37 ▲0.028.57 ▲6.8742.63 ▼0.69
Dashboard /wp-admin2,199 ▲195.65 ▲0.0485.56 ▼6.7738.03 ▼5.57
Posts /wp-admin/edit.php2,107 ▲72.00 ▼0.0036.71 ▼3.5732.26 ▼7.12
Add New Post /wp-admin/post-new.php6,369 ▲4,84327.53 ▲4.32882.89 ▲274.4266.19 ▲8.26
Media Library /wp-admin/upload.php1,404 ▲14.22 ▲0.0196.79 ▼1.6741.94 ▲2.10
Image Compare /wp-admin/tools.php?page=icgb-image-compare1,2978.96291.0470.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-compare-block/admin/admin.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

image-compare-block/plugin.php 69% from 13 tests

The primary PHP file in "Image Comparison Gutenberg Block" version 1.5.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "5.7")
  • Requires PHP: Required version must match the one declared in readme.txt ("5.4" instead of "7.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("image-compare-block.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected859 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71416338
CSS4121303
PHP42255116
JSON10069
Sass20033

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods11
▷ Static methods19.09%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin