100% add-to-cart-button-for-divi

Code Review | Add to Cart Button for Divi

WordPress plugin Add to Cart Button for Divi scored 100% from 54 tests.

About plugin

  • Plugin page: add-to-cart-butto...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 5.9.2
  • First release: Jul 12, 2020
  • Latest release: Jul 12, 2020
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: tlatlauki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 386 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.02MB] [CPU: ▼298.15ms] Passed 4 tests

Analyzing server-side resources used by Add to Cart Button for Divi
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0152.93 ▲3.65
Dashboard /wp-admin3.41 ▲0.0033.27 ▼0.52
Posts /wp-admin/edit.php3.64 ▲0.0036.57 ▲0.36
Add New Post /wp-admin/post-new.php6.91 ▼0.0993.10 ▼1,193.42
Media Library /wp-admin/upload.php3.30 ▲0.0025.38 ▲1.00

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Add to Cart Button for Divi
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.85 ▼0.176.33 ▼0.402.34 ▼0.36
Dashboard /wp-admin2,892 ▲346.15 ▼0.07115.89 ▼19.13156.74 ▼4.86
Posts /wp-admin/edit.php2,691 ▲33.23 ▼0.0169.79 ▲4.29143.57 ▲0.16
Add New Post /wp-admin/post-new.php1,717 ▲7721.28 ▲1.26416.64 ▲12.00156.91 ▼6.85
Media Library /wp-admin/upload.php1,698 ▼05.49 ▼0.03137.96 ▼2.89186.11 ▲2.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests Passed 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 Passed 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
The SRP test was a success

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

Optimizations

Plugin configuration 96% from 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
3 plugin tags: add to cart, woocommerce, divi

add-to-cart-button-for-divi/add-to-cart-button-for-divi.php 92% from 13 tests

"Add to Cart Button for Divi" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to 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

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
There were no executable files found in this plugin6 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1296

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code1.33
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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin