67% ns-recover-abandoned-cart

Code Review | NS Recover Abandoned Cart

WordPress plugin NS Recover Abandoned Cart scored67%from 54 tests.

About plugin

  • Plugin page: ns-recover-abando...
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.9
  • WordPress version: 6.3.1
  • First release: Feb 4, 2019
  • Latest release: Feb 11, 2022
  • Number of updates: 27
  • Update frequency: every 40.9 days
  • Top authors: nsthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,196 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼6.30ms] Passed 4 tests

A check of server-side resources used by NS Recover Abandoned Cart
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2042.72 ▲3.65
Dashboard /wp-admin3.53 ▲0.1847.26 ▼12.98
Posts /wp-admin/edit.php3.64 ▲0.2847.86 ▼4.33
Add New Post /wp-admin/post-new.php6.12 ▲0.2388.09 ▼11.09
Media Library /wp-admin/upload.php3.45 ▲0.2238.25 ▲3.21
How to install premium version /wp-admin/admin.php?page=ns-rac-graph-stats3.3933.77
/wp-admin/admin.php?page=plugineye2483.4239.96
Recover Abandoned Cart /wp-admin/admin.php?page=ns-recover-abandoned-cart/ns-admin-options/ns_admin_option_dashboard.php3.4332.39

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 55 new files
Database: 1 new table, 26 new options
New tables
wp_ns_rac_db_table
New WordPress options
rac_chart_from
rac_timeout
can_compress_scripts
rac_chart_entries_to_show
rac_recovered_number
theysaidso_admin_options
widget_recent-comments
rac_email_name_from
rac_email_title
rac_abandoned_after_timeout
...

Browser metrics Passed 4 tests

NS Recover Abandoned Cart: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲10613.66 ▼0.701.75 ▲0.2143.00 ▲4.47
Dashboard /wp-admin2,243 ▲555.55 ▼0.35100.36 ▼16.0888.14 ▲47.54
Posts /wp-admin/edit.php2,141 ▲492.54 ▲0.5234.68 ▼5.5432.32 ▼4.03
Add New Post /wp-admin/post-new.php1,717 ▲19622.82 ▼0.35686.32 ▲15.0537.95 ▼15.98
Media Library /wp-admin/upload.php1,443 ▲584.70 ▲0.41100.66 ▼28.9277.37 ▲28.58
How to install premium version /wp-admin/admin.php?page=ns-rac-graph-stats6971.8011.4719.37
/wp-admin/admin.php?page=plugineye2489222.3726.9623.28
Recover Abandoned Cart /wp-admin/admin.php?page=ns-recover-abandoned-cart/ns-admin-options/ns_admin_option_dashboard.php8222.3326.6226.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_ns_rac_db_table
  • Zombie WordPress options were found after uninstall: 26 options
    • ns_rac_users
    • ns_rac_report_all_entries
    • can_compress_scripts
    • rac_timeout
    • theysaidso_admin_options
    • rac_email_btn_text
    • rac_recovered_number
    • rac_chart_to
    • rac_email_text
    • rac_email_sender
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ns-rac-graph-stats
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

SRP 50% from 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
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-recover-abandoned-cart/plugineye/plugineye-ajax/plugineye_on_deactivation_function.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ns-recover-abandoned-cart/ns-admin-options/ns_setting_custom_report.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-recover-abandoned-cart/inc/ns-rac-check-woocommerce.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ns-recover-abandoned-cart/ns-admin-options/ns-modal-admin.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots require images: #1 (First installation.), #2 (First mail sent.), #3 (Order set to completed.), #4 (Order RESTORED!), #5 (Mail sent to user.)
You can look at the official readme.txt

ns-recover-abandoned-cart/ns-plugin-home.php 77% from 13 tests

The entry point to "NS Recover Abandoned Cart" version 1.1.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.3.29" instead of "5.6")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("ns-recover-abandoned-cart.php" instead of "ns-plugin-home.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin4,864 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP244403492,213
CSS4196832,150
JavaScript3107289
PO File1123176212

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity21.00
▷ Minimum class complexity20.00
▷ Maximum class complexity22.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods46
▷ Static methods817.39%
▷ Public methods3167.39%
▷ Protected methods00.00%
▷ Private methods1532.61%
Functions41
▷ Named functions2970.73%
▷ Anonymous functions1229.27%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
17 PNG files occupy 0.56MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ns-admin-options/img/backend-sidebar-icon.png1.48KB0.54KB▼ 63.47%
ns-admin-options/img/ns_banner_membership-500.png24.95KB26.27KB0.00%
screenshot-5.png50.30KB16.98KB▼ 66.23%
screenshot-2.png102.57KB29.02KB▼ 71.70%
ns-admin-options/img/email-templates/advanced-one-trasp.png33.25KB15.14KB▼ 54.48%