83% zoom-magnifier-for-woocommerce

Code Review | Zoom magnifier for Woocommerce

WordPress plugin Zoom magnifier for Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: zoom-magnifier-fo...
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Sep 25, 2015
  • Latest release: May 8, 2020
  • Number of updates: 119
  • Update frequency: every 14.2 days
  • Top authors: phoeniixx (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active /20,396 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.22ms] Passed 4 tests

An overview of server-side resources used by Zoom magnifier for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.86 ▼0.04
Dashboard /wp-admin3.31 ▼0.0441.68 ▼12.16
Posts /wp-admin/edit.php3.36 ▲0.0039.85 ▼2.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.64 ▼13.73
Media Library /wp-admin/upload.php3.23 ▲0.0036.63 ▲5.35

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Zoom magnifier for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.28 ▲0.041.74 ▲0.0938.25 ▼4.20
Dashboard /wp-admin2,210 ▲295.49 ▼0.2485.31 ▼12.7836.55 ▼5.78
Posts /wp-admin/edit.php2,124 ▲242.02 ▲0.0335.63 ▼3.0137.63 ▲4.17
Add New Post /wp-admin/post-new.php1,377 ▼15117.27 ▼5.76603.74 ▼53.2664.48 ▲6.89
Media Library /wp-admin/upload.php1,412 ▲124.18 ▼0.0394.13 ▼0.2343.70 ▲0.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/zoom-magnifier-for-woocommerce/all-plugin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 80% 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
These attributes need your attention:
  • Tags: There are too many tags (20 tag instead of maximum 10)
You can take inspiration from this readme.txt

zoom-magnifier-for-woocommerce/zoom_magnifier_for_woocommerce.php 62% from 13 tests

This is the main PHP file of "Zoom magnifier for Woocommerce" version 1.5.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/i18n/languages/" does not exist
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "2.6.0")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 148 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("zoom-magnifier-for-woocommerce.php" instead of "zoom_magnifier_for_woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected521 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP439518521

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.41
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected