83% devxwp-atc-text-for-woocommerce

Code Review | Custom "Add To Cart" Text for WooCommerce

WordPress plugin Custom "Add To Cart" Text for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: devxwp-atc-text-f...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.5
  • WordPress version: 6.3.1
  • First release: Sep 1, 2020
  • Latest release: Sep 1, 2020
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: devxwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /396 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Custom "Add To Cart" Text for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0439.26 ▲0.46
Dashboard /wp-admin3.39 ▲0.0649.99 ▼0.55
Posts /wp-admin/edit.php3.51 ▲0.1245.43 ▼3.21
Add New Post /wp-admin/post-new.php5.97 ▲0.0590.40 ▼7.40
Media Library /wp-admin/upload.php3.31 ▲0.0538.72 ▲3.88

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

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

Browser metrics Passed 4 tests

Custom "Add To Cart" Text for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.14 ▼1.601.60 ▼0.1140.67 ▼2.78
Dashboard /wp-admin2,209 ▲214.85 ▼0.02102.73 ▼9.9138.08 ▼5.89
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0734.72 ▼4.1334.66 ▲3.63
Add New Post /wp-admin/post-new.php1,528 ▼218.62 ▲0.21675.34 ▲22.2152.82 ▼10.80
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.00103.10 ▲1.9045.12 ▲0.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 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 50% from 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 following issues need your attention
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/devxwp-atc-text-for-woocommerce/includes/devxwp-atc-text-product-meta-box.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/devxwp-atc-text-for-woocommerce/includes/devxwp-atc-text-frontend.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/devxwp-atc-text-for-woocommerce/includes/devxwp-atc-text-product-cat-meta.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/devxwp-atc-text-for-woocommerce/includes/devxwp-atc-text-admin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (21 tag instead of maximum 10)
  • Screenshots: Add an image for screenshot #1 (The admin settings)
The official readme.txt is a good inspiration

devxwp-atc-text-for-woocommerce/devxwp-atc-text-for-woocommerce.php 77% from 13 tests

The main file in "Custom "Add To Cart" Text for WooCommerce" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

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
Success! There were no dangerous files found in this plugin259 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP522171259

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.60
▷ Minimum class complexity2.00
▷ Maximum class complexity12.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods21
▷ Static methods14.76%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin