79% ogoship-nettivarasto-api-for-woocommerce

Code Review | Ogoship API for WooCommerce

WordPress plugin Ogoship API for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: ogoship-nettivara...
  • Plugin version: 3.7.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2017
  • Latest release: Dec 21, 2022
  • Number of updates: 81
  • Update frequency: every 23.0 days
  • Top authors: ogoship (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,895 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.20MB] [CPU: ▼44.43ms] Passed 4 tests

An overview of server-side resources used by Ogoship API for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6814.08 ▼29.56
Dashboard /wp-admin2.82 ▼0.5218.28 ▼41.09
Posts /wp-admin/edit.php2.82 ▼0.5319.74 ▼27.42
Add New Post /wp-admin/post-new.php2.82 ▼3.0718.69 ▼79.64
Media Library /wp-admin/upload.php2.82 ▼0.4120.06 ▼11.99

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

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

Browser metrics Passed 4 tests

Ogoship API for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.54 ▲0.201.64 ▲0.0440.20 ▼1.49
Dashboard /wp-admin2,192 ▲185.62 ▲0.0692.63 ▲6.1540.11 ▲0.28
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0339.20 ▲1.0235.48 ▼0.59
Add New Post /wp-admin/post-new.php1,526 ▼023.61 ▲0.06669.44 ▼14.7356.40 ▲3.47
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.02108.40 ▼3.5647.54 ▼1.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/ogoship-nettivarasto-api-for-woocommerce/nettivarasto.php+169
    Undefined index: send_to_nv
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
4 plugin tags: nettivarasto, 3pl, logistics, ogoship

ogoship-nettivarasto-api-for-woocommerce/nettivarasto.php 85% from 13 tests

This is the main PHP file of "Ogoship API for WooCommerce" version 3.7.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("4.5" instead of "3.0.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("ogoship-nettivarasto-api-for-woocommerce.php" instead of "nettivarasto.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,817 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP62513311,687
PO File184129130

PHP code Passed 2 tests

A brief analysis 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.35
Average class complexity35.83
▷ Minimum class complexity7.00
▷ Maximum class complexity128.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods138
▷ Static methods21.45%
▷ Public methods13295.65%
▷ Protected methods42.90%
▷ Private methods21.45%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected