90% nc-ajax-cart-for-woocommerce

Code Review | NC Ajax Cart for woocommerce

WordPress plugin NC Ajax Cart for woocommerce scored90%from 54 tests.

About plugin

  • Plugin page: nc-ajax-cart-for-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Oct 16, 2015
  • Latest release: Jul 3, 2016
  • Number of updates: 27
  • Update frequency: every 9.7 days
  • Top authors: Crispweb (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /3,762 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by NC Ajax Cart for woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.21 ▼5.68
Dashboard /wp-admin3.31 ▲0.0148.86 ▼1.55
Posts /wp-admin/edit.php3.36 ▲0.0153.20 ▲2.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.13 ▼19.39
Media Library /wp-admin/upload.php3.23 ▲0.0139.48 ▲6.71

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for NC Ajax Cart for woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.23 ▼0.121.91 ▲0.3543.59 ▲1.56
Dashboard /wp-admin2,195 ▲185.63 ▲0.0584.08 ▼10.2139.52 ▼3.13
Posts /wp-admin/edit.php2,103 ▼01.96 ▲0.0138.35 ▼3.5434.63 ▼3.39
Add New Post /wp-admin/post-new.php1,526 ▼023.33 ▼0.18663.78 ▼2.1279.51 ▲18.58
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0197.28 ▼11.4045.31 ▼1.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: cart, ajax cart, woocommerce ajax cart, woocommerce cart, ajax cart woocommerce

nc-ajax-cart-for-woocommerce/nc-ajax-cart.php 92% from 13 tests

This is the main PHP file of "NC Ajax Cart for woocommerce" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nc-ajax-cart-for-woocommerce.php" instead of "nc-ajax-cart.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,922 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS246501,182
PHP12240547609
SVG100128
JavaScript1103

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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