83% clip-for-woocommerce

Code Review | Clip Plugin for WooCommerce

WordPress plugin Clip Plugin for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: clip-for-woocommerce
  • Plugin version: 1.0.14
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4-6.2
  • WordPress version: 6.3.1
  • First release: Feb 28, 2023
  • Latest release: Nov 15, 2023
  • Number of updates: 38
  • Update frequency: every 7.1 days
  • Top authors: payclip (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active /3,108 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.10ms] Passed 4 tests

Server-side resources used by Clip Plugin for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.74 ▼5.47
Dashboard /wp-admin3.31 ▲0.0045.88 ▼1.81
Posts /wp-admin/edit.php3.36 ▲0.0045.17 ▲0.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.05 ▼17.60
Media Library /wp-admin/upload.php3.23 ▲0.0031.15 ▼3.53

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Clip Plugin for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2814.10 ▼0.222.02 ▼0.4045.66 ▲2.45
Dashboard /wp-admin2,198 ▲275.62 ▲0.0396.22 ▼6.0843.19 ▼1.71
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0739.78 ▲0.7735.19 ▲2.15
Add New Post /wp-admin/post-new.php1,526 ▼023.35 ▲0.21637.44 ▼0.8149.84 ▼4.73
Media Library /wp-admin/upload.php1,400 ▲34.26 ▲0.0799.36 ▲0.3747.65 ▲4.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/clip-for-woocommerce/templates/page-onboarding.php:12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/clip-for-woocommerce/templates/page-onboarding.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Ecomerciar\\Clip\\Gateway\\apply_filters() in wp-content/plugins/clip-for-woocommerce/src/gateway/settings.php:24
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/clip-for-woocommerce/templates/page-onboarding.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/clip-for-woocommerce/templates/page-onboarding.php on line 8
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/clip-for-woocommerce/templates/page-onboarding.php on line 8
    • > PHP Fatal error
      Trait 'Ecomerciar\\Clip\\Helper\\TemplatesTrait' not found in wp-content/plugins/clip-for-woocommerce/src/helper/class-helper.php on line 13

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 83% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

clip-for-woocommerce/clip-woo.php 69% from 13 tests

Analyzing the main PHP file in "Clip Plugin for WooCommerce" version 1.0.14
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("clip-for-woocommerce.php" instead of "clip-woo.php")
  • Requires at least: Required version number should only contain digits separated by dots (ex. "7.0" instead of "4")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.4" instead of "7.0")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin2,203 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP243097221,665
SVG700401
PO File1393170
JavaScript112567

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity9.48
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces7
Interfaces1
Traits9
Classes11
▷ Abstract classes218.18%
▷ Concrete classes981.82%
▷ Final classes00.00%
Methods74
▷ Static methods4662.16%
▷ Public methods6891.89%
▷ Protected methods22.70%
▷ Private methods45.41%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.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
assets/img/loading-spinner.png1.18KB1.35KB0.00%