89% woocommerce-aways-show-add-to-cart

Code Review | WooCommerce Aways Show Add to Cart

WordPress plugin WooCommerce Aways Show Add to Cart scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-aways...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 3, 2015
  • Latest release: Jul 3, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: fernandoyada (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,166 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by WooCommerce Aways Show Add to Cart
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.04 ▲3.44
Dashboard /wp-admin3.32 ▼0.0347.76 ▼12.66
Posts /wp-admin/edit.php3.37 ▲0.0146.91 ▼1.33
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.56 ▼16.14
Media Library /wp-admin/upload.php3.24 ▲0.0134.64 ▲0.90

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Aways Show Add to Cart
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.25 ▼1.121.66 ▼0.1743.88 ▲2.83
Dashboard /wp-admin2,206 ▲215.85 ▼0.1697.71 ▼2.3638.06 ▼7.07
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0439.47 ▲1.7933.99 ▲1.19
Add New Post /wp-admin/post-new.php1,533 ▲1423.06 ▼0.44632.19 ▼17.9154.05 ▼0.08
Media Library /wp-admin/upload.php1,391 ▲94.22 ▲0.0297.88 ▲3.1343.23 ▲2.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: woocommerce, add to cart

woocommerce-aways-show-add-to-cart/woocommerce-always-show-add-to-cart.php 85% from 13 tests

The main PHP file in "WooCommerce Aways Show Add to Cart" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-aways-show-add-to-cart.php" instead of "woocommerce-always-show-add-to-cart.php")

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
Good job! No executable or dangerous file extensions detected11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171311

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
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%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
There are no PNG files in this plugin