84% oneship

Code Review | OneShip Shipping for WooCommerce

WordPress plugin OneShip Shipping for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: oneship
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1
  • WordPress version: 6.3.1
  • First release: May 6, 2023
  • Latest release: May 6, 2023
  • Number of updates: 4
  • Update frequency: every 2.3 days
  • Top authors: oneship (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /105 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.57ms] Passed 4 tests

An overview of server-side resources used by OneShip Shipping for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.62 ▼13.51
Dashboard /wp-admin3.35 ▲0.0552.06 ▲3.69
Posts /wp-admin/edit.php3.47 ▲0.1149.65 ▼5.57
Add New Post /wp-admin/post-new.php5.94 ▲0.0494.97 ▼1.80
Media Library /wp-admin/upload.php3.28 ▲0.0439.22 ▲2.62

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

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

Browser metrics Passed 4 tests

Checking browser requirements for OneShip Shipping for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.061.89 ▲0.1736.89 ▼13.41
Dashboard /wp-admin2,195 ▲185.54 ▼0.0386.22 ▼14.8344.33 ▲2.22
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0234.15 ▼3.6138.51 ▲1.28
Add New Post /wp-admin/post-new.php1,534 ▼318.01 ▼0.24631.92 ▲1.8975.79 ▲9.76
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.01106.08 ▲7.3051.98 ▲7.99

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/oneship/includes/oneship-shipping.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • License uri: Please fix this invalid URI: ""
The official readme.txt might help

oneship/oneship.php Passed 13 tests

"OneShip Shipping for WooCommerce" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
39 characters long description:
OneShip plugin for easy shipping method

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin393 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP45376359
JavaScript13034

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity8.67
▷ Minimum class complexity6.00
▷ Maximum class complexity10.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods13.70%
▷ Public methods1866.67%
▷ Protected methods933.33%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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