89% cart-in-ajax-on-single-product-page

Code Review | Cart in Ajax on single product page

WordPress plugin Cart in Ajax on single product page scored 89% from 54 tests.

About plugin

  • Plugin page: cart-in-ajax-on-s...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 1, 2023
  • Latest release: Jan 1, 2023
  • Number of updates: 2
  • Update frequency: every 5.5 days
  • Top authors: sharabindu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.10ms] Passed 4 tests

A check of server-side resources used by Cart in Ajax on single product page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.61 ▼3.67
Dashboard /wp-admin3.35 ▲0.0543.80 ▼8.46
Posts /wp-admin/edit.php3.46 ▲0.1147.84 ▲1.42
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.00 ▼14.95
Media Library /wp-admin/upload.php3.27 ▲0.0432.45 ▼1.31

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cart in Ajax on single product page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.60 ▲0.321.69 ▼0.0441.22 ▼2.90
Dashboard /wp-admin2,210 ▲225.87 ▲1.01106.86 ▼11.3838.20 ▼8.20
Posts /wp-admin/edit.php2,092 ▲32.16 ▲0.1742.28 ▲6.3635.59 ▲0.84
Add New Post /wp-admin/post-new.php1,538 ▲2123.19 ▲5.67680.87 ▲5.8565.68 ▲15.15
Media Library /wp-admin/upload.php1,395 ▲74.21 ▲0.0297.68 ▼1.8442.79 ▲0.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

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 no errors were found, this is by no means an exhaustive test

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
Congratulations! This plugin passed the SRP test

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 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: woocommerce, single product page, ajax cart, cart, product

cart-in-ajax-on-single-product-page/cart-in-single-product.php 85% from 13 tests

The entry point to "Cart in Ajax on single product page" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("cart-in-ajax-on-single-product-page.php" instead of "cart-in-single-product.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin198 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP9100416160
JavaScript18238

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity2.33
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods19
▷ Static methods210.53%
▷ Public methods1578.95%
▷ Protected methods00.00%
▷ Private methods421.05%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin