83% wp-image-zoooom

Code Review | WP Image Zoom

WordPress plugin WP Image Zoom scored83%from 54 tests.

About plugin

  • Plugin page: wp-image-zoooom
  • Plugin version: 1.54
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4
  • WordPress version: 6.3.1
  • First release: May 20, 2015
  • Latest release: Nov 14, 2023
  • Number of updates: 191
  • Update frequency: every 16.2 days
  • Top authors: diana_burduja (100%)

Code review

54 tests

User reviews

111 reviews

Install metrics

20,000+ active /685,300 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.30MB] [CPU: ▼4.41ms] Passed 4 tests

This is a short check of server-side resources used by WP Image Zoom
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2340.39 ▼3.28
Dashboard /wp-admin3.64 ▲0.3045.98 ▼5.13
Posts /wp-admin/edit.php3.75 ▲0.4047.06 ▲8.23
Add New Post /wp-admin/post-new.php6.22 ▲0.3483.13 ▼11.76
Media Library /wp-admin/upload.php3.56 ▲0.3337.30 ▲2.52

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 46 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Image Zoom
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲18713.69 ▼0.4410.53 ▲8.9135.81 ▼8.16
Dashboard /wp-admin2,251 ▲735.52 ▼0.1783.84 ▼25.5692.94 ▲55.02
Posts /wp-admin/edit.php2,156 ▲562.00 ▲0.0235.24 ▼6.0335.39 ▼0.88
Add New Post /wp-admin/post-new.php1,582 ▲5623.00 ▼0.09769.35 ▲79.1452.40 ▼21.36
Media Library /wp-admin/upload.php1,459 ▲594.22 ▲0.0197.69 ▼3.2586.25 ▲38.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-image-zoooom/includes/right_columns.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (29 tag instead of maximum 10)
You can look at the official readme.txt

wp-image-zoooom/image-zoooom.php 85% from 13 tests

Analyzing the main PHP file in "WP Image Zoom" version 1.54
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "3.0.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-image-zoooom.php" instead of "image-zoooom.php")

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
Good job! No executable or dangerous file extensions detected4,007 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP113923831,947
PO File3334362933
JavaScript79451455
CSS4235408
SVG4313264

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity38.86
▷ Minimum class complexity1.00
▷ Maximum class complexity71.00
Average method complexity5.34
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods61
▷ Static methods1829.51%
▷ Public methods61100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 1.30MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/silkypress_logo.png0.84KB0.64KB▼ 24.19%
assets/images/product-gallery-zoom.png14.39KB7.70KB▼ 46.54%
assets/images/tinyMCE_button.png1.50KB1.47KB▼ 2.34%
assets/images/rating.png7.61KB5.24KB▼ 31.18%
assets/images/img1_large.png1,206.25KB518.38KB▼ 57.03%