78% change-colors-for-woocommerce

Code Review | Change Colors for WooCommerce

WordPress plugin Change Colors for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: change-colors-for...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: May 28, 2022
  • Latest release: May 28, 2022
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: flawlesstheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /1,118 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.16ms] Passed 4 tests

Server-side resources used by Change Colors for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1140.60 ▲2.92
Dashboard /wp-admin3.39 ▲0.0846.60 ▼1.04
Posts /wp-admin/edit.php3.50 ▲0.1443.23 ▼8.43
Add New Post /wp-admin/post-new.php5.99 ▲0.1090.31 ▼13.66
Media Library /wp-admin/upload.php3.31 ▲0.0835.75 ▼1.51

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Change Colors for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.56 ▼0.825.11 ▲3.3142.22 ▼4.41
Dashboard /wp-admin2,213 ▲224.87 ▼0.01104.62 ▲2.9842.65 ▼1.05
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.1534.16 ▼6.5936.63 ▲0.85
Add New Post /wp-admin/post-new.php1,536 ▲1918.25 ▲0.67632.05 ▼36.1454.23 ▼1.53
Media Library /wp-admin/upload.php1,395 ▲74.21 ▼0.0094.21 ▼3.6641.43 ▲0.20

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/change-colors-for-woocommerce/admin/partials/change-colors-for-woocommerce-admin-display.php
    • > /wp-content/plugins/change-colors-for-woocommerce/public/partials/change-colors-for-woocommerce-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/change-colors-for-woocommerce/includes/class-change-colors-for-woocommerce.php:374

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

change-colors-for-woocommerce/change-colors-for-woocommerce.php Passed 13 tests

"Change Colors for WooCommerce" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
131 characters long description:
Change Colors for WooCommerce will help you to change woocommerce default styles like button colors and other Woocommerce Elements.

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 plugin380 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12201535374
JavaScript24546
CSS2080

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.12
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin