90% open-cart-after-add-to-cart

Code Review | Open Cart After Add to Cart

WordPress plugin Open Cart After Add to Cart scored90%from 54 tests.

About plugin

  • Plugin page: open-cart-after-a...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 6.3.1
  • First release: Mar 1, 2021
  • Latest release: Mar 1, 2021
  • Number of updates: 10
  • Update frequency: every 3.1 days
  • Top authors: navarroido (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /477 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.70ms] Passed 4 tests

Analyzing server-side resources used by Open Cart After Add to Cart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.56 ▼1.14
Dashboard /wp-admin3.31 ▲0.0148.80 ▼2.85
Posts /wp-admin/edit.php3.36 ▲0.0046.60 ▼7.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.44 ▲0.52
Media Library /wp-admin/upload.php3.23 ▲0.0039.73 ▲5.50

Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] 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
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Open Cart After Add to Cart: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.29 ▼0.292.49 ▲0.5542.88 ▼2.30
Dashboard /wp-admin2,240 ▲374.86 ▼0.05101.89 ▼0.6043.30 ▲6.39
Posts /wp-admin/edit.php2,117 ▲142.06 ▲0.0637.52 ▼0.1238.48 ▲2.31
Add New Post /wp-admin/post-new.php1,557 ▲3122.95 ▲5.54700.60 ▲16.7256.35 ▼13.34
Media Library /wp-admin/upload.php1,419 ▲194.21 ▼0.02100.33 ▼8.9446.56 ▼3.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: add to cart, open mini-cart, open cart, cart, mini-cart

open-cart-after-add-to-cart/open-cart-after-add-to-cart.php Passed 13 tests

The main PHP file in "Open Cart After Add to Cart" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
95 characters long description:
This light plugin allows you automatically open the mini-cart when a product added to the cart.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected34 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2154834

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected