89% wc-cart-ajax-simple-and-variation

Code Review | Ajaxify Cart

WordPress plugin Ajaxify Cart scored89%from 54 tests.

About plugin

  • Plugin page: wc-cart-ajax-simp...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Jul 6, 2020
  • Latest release: Jul 8, 2020
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: aoulmderat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /510 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Ajaxify Cart
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.99 ▼0.13
Dashboard /wp-admin3.31 ▼0.0451.55 ▼13.11
Posts /wp-admin/edit.php3.36 ▲0.0050.60 ▲0.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.97 ▼8.16
Media Library /wp-admin/upload.php3.23 ▲0.0037.63 ▼1.00

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Ajaxify Cart
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲16013.62 ▼0.765.91 ▲4.3643.90 ▲0.98
Dashboard /wp-admin2,209 ▲214.86 ▼0.03109.21 ▲1.0740.63 ▲0.08
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0138.85 ▲0.0634.47 ▼0.18
Add New Post /wp-admin/post-new.php1,533 ▼323.10 ▼0.10689.17 ▲2.9354.80 ▲2.14
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.0196.95 ▼21.2345.11 ▼3.93

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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)
Everything seems fine, however this is by no means 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: add to cart, ajax, variable products, simple products, variation products...

wc-cart-ajax-simple-and-variation/ajaxify-cart.php 62% from 13 tests

The entry point to "Ajaxify Cart" version 1.0.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 161 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0.1" instead of "3.0")
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-cart-ajax-simple-and-variation.php" instead of "ajaxify-cart.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin64 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript115451
PHP263613

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 are no PNG files in this plugin