79% zoom-image-simple-script

Code Review | Zoom image simple script

WordPress plugin Zoom image simple script scored79%from 54 tests.

About plugin

  • Plugin page: zoom-image-simple...
  • Plugin version: 1.2
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Apr 13, 2021
  • Latest release: Dec 1, 2022
  • Number of updates: 7
  • Update frequency: every 85.4 days
  • Top authors: gopiplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /486 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼11.92ms] Passed 4 tests

A check of server-side resources used by Zoom image simple script
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0940.14 ▼11.94
Dashboard /wp-admin3.39 ▲0.0547.61 ▼7.07
Posts /wp-admin/edit.php3.51 ▲0.1543.39 ▼6.26
Add New Post /wp-admin/post-new.php5.97 ▲0.0979.19 ▼22.41
Media Library /wp-admin/upload.php3.31 ▲0.0939.23 ▲7.35
Zoom image /wp-admin/options-general.php?page=zoom-image-simple-script3.3231.16

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 21 new files
Database: 1 new table, 8 new options
New tables
wp_zoom_image_simples
New WordPress options
can_compress_scripts
zoom-image-simple-script
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_zoom-image-simple-script
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Zoom image simple script
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲12813.85 ▼0.759.40 ▲7.4241.69 ▲2.17
Dashboard /wp-admin2,193 ▲155.62 ▼0.0992.90 ▼16.4943.24 ▼0.90
Posts /wp-admin/edit.php2,104 ▲11.96 ▼0.0236.09 ▼6.7034.60 ▼1.93
Add New Post /wp-admin/post-new.php1,528 ▲223.61 ▲0.53665.12 ▼21.9957.64 ▲5.66
Media Library /wp-admin/upload.php1,395 ▼54.20 ▲0.0798.06 ▼1.6541.98 ▼2.81
Zoom image /wp-admin/options-general.php?page=zoom-image-simple-script9502.0228.3028.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_zoom-image-simple-script

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=zoom-image-simple-script
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/zoom-image-simple-script/zoom-image-simple-script.php
    • > /wp-content/plugins/zoom-image-simple-script/pages/image-management-edit.php
    • > /wp-content/plugins/zoom-image-simple-script/pages/image-management-show.php
    • > /wp-content/plugins/zoom-image-simple-script/pages/image-management-add.php

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 Passed 29 tests

readme.txt Passed 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
4 plugin tags: image, plugin, widget, zoom

zoom-image-simple-script/zoom-image-simple-script.php Passed 13 tests

The main PHP script in "Zoom image simple script" version 1.2 is automatically included on every request by WordPress
24 characters long description:
Zoom image simple script

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 detected1,297 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP715523925
JavaScript2163187
PO File15486125
CSS17060

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.25
▷ Minimum class complexity10.00
▷ Maximum class complexity18.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods26
▷ Static methods2076.92%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/image-icon.png2.98KB0.54KB▼ 81.86%