84% embed-code-for-woo

Code Review | Embed Code for WooCommerce

WordPress plugin Embed Code for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: embed-code-for-woo
  • Plugin version: 0.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: May 26, 2020
  • Latest release: May 29, 2020
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: siddhu09rocks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /429 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Embed Code for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.22 ▼3.74
Dashboard /wp-admin3.31 ▲0.0148.92 ▼6.70
Posts /wp-admin/edit.php3.36 ▲0.0149.80 ▲1.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.05 ▼49.78
Media Library /wp-admin/upload.php3.24 ▲0.0137.80 ▼0.89

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Embed Code for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲2514.67 ▲0.301.68 ▼0.3049.37 ▲3.30
Dashboard /wp-admin2,210 ▲335.63 ▼0.0290.46 ▼0.5742.30 ▼3.96
Posts /wp-admin/edit.php2,115 ▲151.95 ▲0.0140.26 ▼7.4536.89 ▼14.01
Add New Post /wp-admin/post-new.php1,541 ▲1522.82 ▼0.36656.31 ▼9.7154.68 ▲5.27
Media Library /wp-admin/upload.php1,412 ▲124.22 ▼0.0098.98 ▼7.1545.18 ▼6.65

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

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 no errors were found, this is by no means an exhaustive test

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 take a closer look at 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/embed-code-for-woo/woocommerce-embed-code-settings.php:8

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: analytics, code, pixel, pages, embed code...

embed-code-for-woo/woocommerce-embed-code.php 92% from 13 tests

The main file in "Embed Code for WooCommerce" v. 0.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("embed-code-for-woo.php" instead of "woocommerce-embed-code.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin128 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22616128

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity9.00
▷ Minimum method complexity9.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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 are no PNG files in this plugin