90% wc-huu

Code Review | Huu WP for WooCommerce

WordPress plugin Huu WP for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wc-huu
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.1-6.0.3
  • WordPress version: 6.3.1
  • First release: May 21, 2021
  • Latest release: Nov 4, 2022
  • Number of updates: 35
  • Update frequency: every 15.2 days
  • Top authors: huuguu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /566 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Huu WP for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.66 ▼0.84
Dashboard /wp-admin3.33 ▲0.0249.94 ▼3.22
Posts /wp-admin/edit.php3.38 ▲0.0252.62 ▲0.99
Add New Post /wp-admin/post-new.php5.91 ▲0.02107.28 ▲11.78
Media Library /wp-admin/upload.php3.25 ▲0.0236.28 ▲0.19

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Huu WP for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3513.69 ▼0.691.72 ▼0.4645.36 ▼0.09
Dashboard /wp-admin2,209 ▲215.91 ▲0.97107.35 ▲4.2544.90 ▲6.15
Posts /wp-admin/edit.php2,095 ▲91.97 ▼0.0339.78 ▲3.7635.99 ▲2.88
Add New Post /wp-admin/post-new.php1,548 ▲1518.30 ▼5.04591.01 ▼83.8756.51 ▲8.49
Media Library /wp-admin/upload.php1,394 ▲64.22 ▲0.0193.04 ▼4.5441.19 ▼2.89

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
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: whatspp loop products, loop products, woocommerce, plugin whatsapp, whatsapp single product page...

wc-huu/wc-huu.php Passed 13 tests

The main PHP script in "Huu WP for WooCommerce" version 1.1.4 is automatically included on every request by WordPress
67 characters long description:
To show Whatsapp button in Loop Products and/or Single Product Page

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
No dangerous file extensions were detected325 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34231178
PO File24051116
CSS123231

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
imgs/whatsapp.png0.94KB1.02KB0.00%