83% metricks-for-woocommerce

Code Review | Metricks for WooCommerce

WordPress plugin Metricks for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: metricks-for-wooc...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9
  • WordPress version: 6.3.1
  • First release: Mar 22, 2022
  • Latest release: Jul 28, 2022
  • Number of updates: 6
  • Update frequency: every 23.5 days
  • Top authors: metricksio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /288 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.76ms] Passed 4 tests

Server-side resources used by Metricks for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.77 ▼5.84
Dashboard /wp-admin3.32 ▲0.0250.26 ▼4.74
Posts /wp-admin/edit.php3.37 ▲0.0155.72 ▼4.37
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.42 ▼8.08
Media Library /wp-admin/upload.php3.24 ▲0.0136.61 ▲0.08

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Metricks for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.34 ▲0.051.87 ▲0.0840.97 ▲3.73
Dashboard /wp-admin2,201 ▲275.57 ▼0.0486.70 ▼11.0942.64 ▼1.30
Posts /wp-admin/edit.php2,106 ▲62.12 ▲0.1140.64 ▼0.1739.59 ▲4.71
Add New Post /wp-admin/post-new.php1,552 ▲2023.57 ▲0.36583.91 ▼104.5447.17 ▼0.50
Media Library /wp-admin/upload.php1,409 ▲94.18 ▼0.0297.01 ▼14.4845.28 ▼0.13

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/metricks-for-woocommerce/includes/class-wc-metricks-integration.php
    • > /wp-content/plugins/metricks-for-woocommerce/woocommerce-metricks.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

metricks-for-woocommerce/woocommerce-metricks.php 85% from 13 tests

"Metricks for WooCommerce" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("metricks-for-woocommerce.php" instead of "woocommerce-metricks.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin411 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP36654392
Markdown18019

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.67
▷ Minimum class complexity2.00
▷ Maximum class complexity21.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1680.00%
▷ Protected methods00.00%
▷ Private methods420.00%
Functions5
▷ Named functions5100.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
There were not PNG files found in your plugin