84% wc-style

Code Review | Change Cart button Colors WooCommerce

WordPress plugin Change Cart button Colors WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-style
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Apr 20, 2017
  • Latest release: Nov 13, 2017
  • Number of updates: 14
  • Update frequency: every 14.9 days
  • Top authors: themelocation (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /5,015 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Change Cart button Colors WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.25 ▼9.99
Dashboard /wp-admin3.31 ▲0.0049.26 ▲0.39
Posts /wp-admin/edit.php3.36 ▲0.0048.63 ▼0.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.02 ▼5.80
Media Library /wp-admin/upload.php3.23 ▲0.0035.13 ▲2.13

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Change Cart button Colors WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.31 ▼1.271.61 ▼0.5644.97 ▲1.45
Dashboard /wp-admin2,203 ▲185.83 ▲0.02100.42 ▼18.8042.13 ▼1.62
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0233.91 ▼1.1642.08 ▲7.59
Add New Post /wp-admin/post-new.php1,538 ▲523.22 ▼0.14579.22 ▼92.5253.95 ▼1.65
Media Library /wp-admin/upload.php1,388 ▲64.23 ▼0.0799.65 ▲4.3139.34 ▼5.12

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

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

Smoke tests 75% from 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 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wc-style/index.php:11

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 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: change add to cart color, woocommerce cart button, woocommerce color, change add to cart background color, woocommerce

wc-style/index.php 92% from 13 tests

This is the main PHP file of "Change Cart button Colors WooCommerce" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-style.php" instead of "index.php")

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 detected758 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP123523673
CSS66177
JavaScript1208

PHP code Passed 2 tests

Analyzing 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.45
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png0.62KB0.40KB▼ 35.49%