84% colors-for-woocommerce

Code Review | Colors For WooCommerce

WordPress plugin Colors For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: colors-for-woocom...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Jan 14, 2017
  • Latest release: Jan 14, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: seosbg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,646 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.87ms] Passed 4 tests

This is a short check of server-side resources used by Colors For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0450.85 ▲10.81
Dashboard /wp-admin3.33 ▼0.0145.07 ▼17.44
Posts /wp-admin/edit.php3.38 ▲0.0243.27 ▼0.22
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.34 ▼6.86
Media Library /wp-admin/upload.php3.25 ▲0.0238.99 ▲5.05

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Colors For WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲11813.62 ▼0.782.18 ▲0.5544.45 ▲0.77
Dashboard /wp-admin2,245 ▲534.99 ▲0.10105.92 ▼1.1190.74 ▲53.92
Posts /wp-admin/edit.php2,124 ▲562.30 ▲0.2835.51 ▲0.8634.80 ▲0.47
Add New Post /wp-admin/post-new.php1,543 ▲1017.57 ▼5.76693.65 ▼0.3438.77 ▼28.09
Media Library /wp-admin/upload.php1,418 ▲334.40 ▲0.19112.21 ▲12.4951.37 ▲6.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/colors-for-woocommerce/colors-for-woocommerce.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Admin Panel view of submitted form data.) image required
The official readme.txt is a good inspiration

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

This is the main PHP file of "Colors For 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
49 characters long description:
Simple WordPress Plugin - Colors For WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected210 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP12612100
CSS112064
PO File1121243
JavaScript1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.03
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png14.74KB5.15KB▼ 65.05%
images/icon.png1.58KB1.43KB▼ 9.69%
images/logo.png11.25KB4.39KB▼ 60.99%