89% ngd-custom-add-to-cart-label

Code Review | WooCommerce Custom Add To Cart Label

WordPress plugin WooCommerce Custom Add To Cart Label scored89%from 54 tests.

About plugin

  • Plugin page: ngd-custom-add-to...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 11, 2020
  • Latest release: Feb 2, 2023
  • Number of updates: 9
  • Update frequency: every 100.7 days
  • Top authors: dipakparmar443 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /2,409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by WooCommerce Custom Add To Cart Label
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.83 ▲0.29
Dashboard /wp-admin3.31 ▲0.0055.64 ▲3.72
Posts /wp-admin/edit.php3.36 ▲0.0047.06 ▼10.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.32 ▼13.36
Media Library /wp-admin/upload.php3.23 ▲0.0037.29 ▲0.71

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

WooCommerce Custom Add To Cart Label: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.071.84 ▼0.2343.52 ▼4.54
Dashboard /wp-admin2,209 ▲215.86 ▲0.92104.43 ▼1.3443.16 ▼1.64
Posts /wp-admin/edit.php2,086 ▼32.02 ▼0.0133.49 ▼4.2432.27 ▼1.82
Add New Post /wp-admin/post-new.php1,542 ▼018.09 ▼0.59617.75 ▲18.1970.16 ▼8.61
Media Library /wp-admin/upload.php1,391 ▲34.26 ▲0.0997.11 ▼0.4940.85 ▼4.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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)
Even though everything seems fine, this is not 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Settings), #2 (Shop page), #3 (Single product page), #4 (Category Page)
You can look at the official readme.txt

ngd-custom-add-to-cart-label/ngd-custom-add-to-cart-label.php 92% from 13 tests

The primary PHP file in "WooCommerce Custom Add To Cart Label" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.5.0" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected236 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34571236

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity5.20
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected