78% cross-channel-inventory

Code Review | Cross Channel Inventory

WordPress plugin Cross Channel Inventory scored78%from 54 tests.

About plugin

  • Plugin page: cross-channel-inv...
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 6.3.1
  • First release: Aug 27, 2021
  • Latest release: Sep 20, 2021
  • Number of updates: 10
  • Update frequency: every 2.6 days
  • Top authors: crosschannelinventory (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /374 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Cross Channel Inventory
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.57 ▼6.57
Dashboard /wp-admin3.31 ▼0.0348.86 ▼12.71
Posts /wp-admin/edit.php3.36 ▲0.0048.95 ▲0.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.27 ▼17.93
Media Library /wp-admin/upload.php3.23 ▲0.0035.52 ▲1.72

Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Cross Channel Inventory
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲1514.31 ▲0.092.24 ▲0.1742.76 ▼2.83
Dashboard /wp-admin2,207 ▲355.55 ▼0.1585.35 ▼20.3538.37 ▼4.26
Posts /wp-admin/edit.php2,112 ▲151.95 ▼0.0240.47 ▲4.1236.02 ▲0.31
Add New Post /wp-admin/post-new.php1,538 ▲323.31 ▲5.12659.08 ▲34.4245.96 ▼21.22
Media Library /wp-admin/upload.php1,412 ▲154.21 ▼0.11107.51 ▲8.4648.80 ▲3.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/cross-channel-inventory/templates/api.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cross-channel-inventory/api/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cross-channel-inventory/connect.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cross-channel-inventory/index.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cross-channel-inventory/main_dashboard.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/cross-channel-inventory/index.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: ebay, woocommerce, amazon

cross-channel-inventory/index.php 77% from 13 tests

The entry point to "Cross Channel Inventory" version 1.0.8 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cross-channel-inventory.php" instead of "index.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "4.9")
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)

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
There were no executable files found in this plugin540 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP613456494
Markdown113046

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin