84% wcspots

Code Review | WCSpots - image hotspots for WooCommerce

WordPress plugin WCSpots - image hotspots for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wcspots
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Jun 15, 2023
  • Latest release: Sep 27, 2023
  • Number of updates: 14
  • Update frequency: every 7.9 days
  • Top authors: Anydog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /241 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.04MB] [CPU: ▼3.97ms] Passed 4 tests

This is a short check of server-side resources used by WCSpots - image hotspots for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0741.08 ▼3.26
Dashboard /wp-admin3.36 ▲0.0148.99 ▼11.45
Posts /wp-admin/edit.php3.41 ▲0.0548.24 ▼6.25
Add New Post /wp-admin/post-new.php5.94 ▲0.0695.26 ▲5.10
Media Library /wp-admin/upload.php3.28 ▲0.0547.73 ▲13.27

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WCSpots - image hotspots for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.29 ▼0.321.71 ▲0.0843.47 ▲3.15
Dashboard /wp-admin2,221 ▲475.64 ▼0.0383.04 ▼17.8943.40 ▲0.82
Posts /wp-admin/edit.php2,124 ▲212.11 ▲0.1135.99 ▼0.1432.37 ▼3.46
Add New Post /wp-admin/post-new.php6,395 ▲4,86728.22 ▲5.09815.64 ▲108.5862.37 ▼6.43
Media Library /wp-admin/upload.php1,423 ▲204.15 ▼0.09103.75 ▼2.0950.39 ▲2.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wcspots/wcspots.php:89

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: gutenberg, block, hotspots, showcase, woocommerce

wcspots/wcspots.php 85% from 13 tests

The entry point to "WCSpots - image hotspots for WooCommerce" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.4" instead of "7.0")
  • Requires at least: The required version number did not match the one declared in readme.txt ("6.0" instead of "6.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin36,918 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
JSON49032,964
JavaScript284514373,149
Sass21074689
Markdown130064
PHP3123445
SVG1005
CSS2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.06
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.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
16 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/controls/icons/popoverLayout_4.png0.56KB0.37KB▼ 33.80%
src/controls/icons/Layout_1.png1.17KB0.72KB▼ 38.35%
build/images/Layout_3.af9a2e35.png1.46KB0.80KB▼ 44.74%
src/controls/icons/Layout_3.png1.46KB0.80KB▼ 44.74%
src/controls/icons/Layout_2.png0.94KB0.51KB▼ 45.48%