78% outshifter-embed-commerce

Code Review | Reachu Embed Commerce

WordPress plugin Reachu Embed Commerce scored78%from 54 tests.

About plugin

  • Plugin page: outshifter-embed-...
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 1, 2022
  • Latest release: Sep 13, 2023
  • Number of updates: 100
  • Update frequency: every 5.3 days
  • Top authors: outshifter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /668 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.70MB] [CPU: ▼4.73ms] Passed 4 tests

This is a short check of server-side resources used by Reachu Embed Commerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.15 ▲0.6844.06 ▼2.39
Dashboard /wp-admin3.99 ▲0.6864.60 ▲8.29
Posts /wp-admin/edit.php4.10 ▲0.7553.93 ▼3.31
Add New Post /wp-admin/post-new.php6.84 ▲0.9594.64 ▼16.47
Media Library /wp-admin/upload.php3.91 ▲0.6843.17 ▲3.25

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 80 new files
Database: no new tables, 58 new options
New WordPress options
outshifter_blocks_supplier_logo_shop
outshifter_blocks_g_analytics
outshifter_blocks_shop_text_selected
outshifter_blocks_add_shop_url
outshifter_blocks_saved_media_images
outshifter_blocks_text_icon_color
outshifter_blocks_seller_id
outshifter_blocks_show_shop_icon
outshifter_blocks_supplier_logo
outshifter_blocks_mixpanel
...

Browser metrics Passed 4 tests

A check of browser resources used by Reachu Embed Commerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲12015.69 ▲1.2866.03 ▲64.0241.92 ▼3.10
Dashboard /wp-admin2,236 ▲595.91 ▲0.2899.06 ▼5.0074.62 ▲33.04
Posts /wp-admin/edit.php2,158 ▲582.29 ▲0.3235.15 ▼2.1034.21 ▼0.11
Add New Post /wp-admin/post-new.php1,725 ▲19724.91 ▲1.67699.98 ▲11.1235.97 ▼30.37
Media Library /wp-admin/upload.php1,447 ▲504.30 ▲0.06105.18 ▼11.0586.70 ▲34.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • outshifter_blocks_title_alignment
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/outshifter-embed-commerce/admin/partials/outsfhiter-wordpress-admin-display.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function post_class() in wp-content/plugins/outshifter-embed-commerce/includes/layout.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/outshifter-embed-commerce/includes/shortcodes/carousel.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/outshifter-embed-commerce/includes/cart.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/outshifter-embed-commerce/includes/shortcodes/preview-shop.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/outshifter-embed-commerce/includes/shortcodes/two-products.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/outshifter-embed-commerce/includes/shortcodes/unique-product.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/outshifter-embed-commerce/includes/shortcodes/action-button.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/outshifter-embed-commerce/admin/partials/custom-shortcodes.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/outshifter-embed-commerce/includes/shortcodes/shop.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/outshifter-embed-commerce/admin/partials/custom-shortcodes.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

outshifter-embed-commerce/outshifter-blocks.php 92% from 13 tests

The main PHP file in "Reachu Embed Commerce" ver. 1.1.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("outshifter-embed-commerce.php" instead of "outshifter-blocks.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected6,397 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP193532854,135
CSS14263171,725
JavaScript4495418
SVG130063
Markdown144056

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity51.80
▷ Minimum class complexity2.00
▷ Maximum class complexity147.00
Average method complexity7.07
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods45
▷ Static methods48.89%
▷ Public methods4293.33%
▷ Protected methods00.00%
▷ Private methods36.67%
Functions20
▷ Named functions1995.00%
▷ Anonymous functions15.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.19MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/modal-right.png3.06KB1.45KB▼ 52.49%
admin/assets/left-column.png2.75KB1.20KB▼ 56.44%
admin/assets/modal-center.png4.13KB1.44KB▼ 65.19%
admin/assets/sale.png4.68KB4.13KB▼ 11.69%
admin/assets/center.png2.78KB1.21KB▼ 56.54%