100% ajax-add-to-cart-on-hover

Code Review | Ajax add to cart on hover Plugin

WordPress plugin Ajax add to cart on hover Plugin scored 100% from 54 tests.

About plugin

  • Plugin page: ajax-add-to-cart-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 5.9.2
  • First release: Jan 6, 2020
  • Latest release: Jan 6, 2020
  • Number of updates: 2
  • Update frequency: every 12.5 days
  • Top authors: scrumwheel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 368 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by Ajax add to cart on hover Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0855.66 ▲2.13
Dashboard /wp-admin3.45 ▲0.0432.24 ▼0.38
Posts /wp-admin/edit.php3.67 ▲0.0336.37 ▲1.23
Add New Post /wp-admin/post-new.php6.92 ▼0.0593.49 ▼1,192.50
Media Library /wp-admin/upload.php3.32 ▲0.0226.59 ▼4.96

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Ajax add to cart on hover Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,875 ▲12116.18 ▲0.529.60 ▲3.952.26 ▼0.43
Dashboard /wp-admin2,892 ▲386.14 ▲0.04117.96 ▼12.33155.86 ▼5.86
Posts /wp-admin/edit.php2,691 ▼33.22 ▼0.0066.05 ▲0.57140.71 ▼1.29
Add New Post /wp-admin/post-new.php1,781 ▲6422.84 ▲2.10437.39 ▼0.27160.31 ▲1.76
Media Library /wp-admin/upload.php1,698 ▲35.46 ▼0.08141.41 ▼1.67185.89 ▼4.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: ajax add to cart, ajax, variable products, add-to-cart on hover, e-commerce...

ajax-add-to-cart-on-hover/ajax-add-to-cart-on-hover.php Passed 13 tests

The primary PHP file in "Ajax add to cart on hover Plugin" version 1.0.0 is used by WordPress to initiate all plugin functionality
133 characters long description:
Ajax add to cart on hover Plugin is used for adding variable products to cart using overlay on image when hovered over product image.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin438 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS21123181
JavaScript43930123
PHP17933118
SVG10116

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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 functions787.50%
▷ Anonymous functions112.50%
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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
check-mark.png6.35KB4.30KB▼ 32.29%
cross.png4.09KB2.37KB▼ 42.16%