89% image-block-zoom-on-hover

Code Review | Image Magnify Glass - Gutenberg Image Block

WordPress plugin Image Magnify Glass - Gutenberg Image Block scored89%from 54 tests.

About plugin

  • Plugin page: image-block-zoom-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 11, 2022
  • Latest release: Apr 26, 2023
  • Number of updates: 8
  • Update frequency: every 36.6 days
  • Top authors: grandplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /452 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.44ms] Passed 4 tests

Server-side resources used by Image Magnify Glass - Gutenberg Image Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.21 ▼2.27
Dashboard /wp-admin3.39 ▲0.0447.84 ▼18.27
Posts /wp-admin/edit.php3.50 ▲0.1448.11 ▲4.07
Add New Post /wp-admin/post-new.php7.06 ▲1.17104.64 ▲4.49
Media Library /wp-admin/upload.php3.31 ▲0.0838.62 ▲2.73

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Image Magnify Glass - Gutenberg Image Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲13014.47 ▲0.1128.22 ▲26.5843.18 ▲1.06
Dashboard /wp-admin2,198 ▲215.62 ▼0.0781.31 ▼18.3941.28 ▼1.75
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0133.85 ▼4.6534.26 ▼4.48
Add New Post /wp-admin/post-new.php1,541 ▲1324.86 ▲1.88604.54 ▼52.9433.29 ▼19.13
Media Library /wp-admin/upload.php1,394 ▼34.18 ▲0.0696.98 ▼18.5841.91 ▼6.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed: You can look at the official readme.txt

image-block-zoom-on-hover/gpls-ibzoh-image-block-zoom-on-hover.php 77% from 13 tests

The main PHP script in "Image Magnify Glass - Gutenberg Image Block" version 1.0.2 is automatically included on every request by WordPress
The following require your attention:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.4" instead of "5.6")
  • Main file name: Name the main plugin file the same as the plugin slug ("image-block-zoom-on-hover.php" instead of "gpls-ibzoh-image-block-zoom-on-hover.php")
  • 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
Everything looks great! No dangerous files found in this plugin469 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11103259465
CSS2002
JavaScript2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity13.20
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods38
▷ Static methods1026.32%
▷ Public methods3284.21%
▷ Protected methods00.00%
▷ Private methods615.79%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin