74% woo-like-counter

Code Review | WooCommerce Like Counter

WordPress plugin WooCommerce Like Counter scored 74% from 54 tests.

About plugin

  • Plugin page: woo-like-counter
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.3
  • WordPress version: 6.3.1
  • First release: Nov 9, 2017
  • Latest release: Nov 9, 2017
  • Number of updates: 11
  • Update frequency: every 0.1 days
  • Top authors: glorywebs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 708 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.21ms] Passed 4 tests

A check of server-side resources used by WooCommerce Like Counter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0447.82 ▲6.66
Dashboard /wp-admin3.33 ▲0.0347.28 ▼2.59
Posts /wp-admin/edit.php3.38 ▲0.0346.06 ▼0.59
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.61 ▼18.02
Media Library /wp-admin/upload.php3.25 ▲0.0338.48 ▲0.35

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: 1 new table, 7 new options
New tables
wp_woocommerce_like_dislike
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
wcld_db_version
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Like Counter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲15113.61 ▼0.745.45 ▲3.6136.68 ▼5.26
Dashboard /wp-admin2,206 ▲175.83 ▲0.95100.13 ▼13.0737.60 ▼9.28
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0437.31 ▲0.4631.10 ▼3.64
Add New Post /wp-admin/post-new.php1,534 ▲123.15 ▲0.00601.86 ▼17.7850.89 ▼15.25
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0898.03 ▼17.0141.82 ▼7.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_woocommerce_like_dislike
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • wcld_db_version
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/woo-like-counter/woocommerce-likecounter.php:38

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: dislike, woocommerce, like

woo-like-counter/woocommerce-likecounter.php 92% from 13 tests

The primary PHP file in "WooCommerce Like Counter" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-like-counter.php" instead of "woocommerce-likecounter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin219 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1169106
JavaScript12062
CSS11051

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions4
▷ Named functions4100.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 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/like-unlike.png1.34KB0.28KB▼ 79.37%