66% invition-print-ship

Code Review | Printeers Print & Ship

WordPress plugin Printeers Print & Ship scored66%from 54 tests.

About plugin

  • Plugin page: invition-print-ship
  • Plugin version: 1.16.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Feb 26, 2019
  • Latest release: Oct 18, 2022
  • Number of updates: 59
  • Update frequency: every 22.6 days
  • Top authors: invition (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /4,777 total downloads

Benchmarks

Plugin footprint 83% 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: ▲3.32MB] [CPU: ▲15.39ms] Passed 4 tests

An overview of server-side resources used by Printeers Print & Ship
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /6.64 ▲3.1756.03 ▲18.89
Dashboard /wp-admin6.66 ▲3.3164.25 ▲5.86
Posts /wp-admin/edit.php6.71 ▲3.3561.16 ▲9.68
Add New Post /wp-admin/post-new.php9.35 ▲3.47136.65 ▲33.04
Media Library /wp-admin/upload.php6.66 ▲3.4461.73 ▲27.12
Tools /wp-admin/admin.php?page=print-and-ship-tools6.4857.43
Add Simple products /wp-admin/admin.php?page=print-and-ship-create-a-simple-product6.5452.48
Product updates /wp-admin/admin.php?page=print-and-ship-update-json6.7851.42
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools6.3345.61
Field Groups /wp-admin/edit.php?post_type=acf-field-group6.6453.47
Support /wp-admin/admin.php?page=print-and-ship-support6.4850.06
Add New /wp-admin/post-new.php?post_type=acf-field-group6.7668.49
Create a product /wp-admin/admin.php?page=print-and-ship-create-a-product6.4852.14
Settings /wp-admin/admin.php?page=print-and-ship-config6.5866.38
Product updates /wp-admin/admin.php?page=print-and-ship-update-products6.7852.02

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 515 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
print_and_ship_version
widget_recent-posts
widget_theysaidso_widget
print_and_ship_order_status
can_compress_scripts
widget_recent-comments
acf_version
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Printeers Print & Ship
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲17313.63 ▼1.001.86 ▲0.1038.90 ▼2.98
Dashboard /wp-admin2,301 ▲1194.89 ▼1.00112.16 ▲9.8942.89 ▼2.04
Posts /wp-admin/edit.php2,182 ▲902.05 ▲0.0437.98 ▼7.5733.85 ▼3.11
Add New Post /wp-admin/post-new.php6,688 ▲5,16029.20 ▲6.121,043.57 ▲449.7839.35 ▼7.13
Media Library /wp-admin/upload.php2,017 ▲6268.25 ▲4.01219.39 ▲112.9051.88 ▲6.28
Tools /wp-admin/admin.php?page=print-and-ship-tools8642.0829.2758.28
Add Simple products /wp-admin/admin.php?page=print-and-ship-create-a-simple-product9212.0527.6225.18
Product updates /wp-admin/admin.php?page=print-and-ship-update-json9342.0827.1724.46
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools280.440.083.64
Field Groups /wp-admin/edit.php?post_type=acf-field-group1,2232.6949.0133.95
Support /wp-admin/admin.php?page=print-and-ship-support8992.0726.1125.81
Add New /wp-admin/post-new.php?post_type=acf-field-group2,2353.7377.1547.64
Create a product /wp-admin/admin.php?page=print-and-ship-create-a-product9341.8525.9526.96
Settings /wp-admin/admin.php?page=print-and-ship-config1,7742.0335.1040.67
Product updates /wp-admin/admin.php?page=print-and-ship-update-products9732.7943.4926.16

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • acf_version
    • can_compress_scripts
    • theysaidso_admin_options
    • print_and_ship_version
    • print_and_ship_order_status

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=print-and-ship-support
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory

SRP 0% from 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
The following issues need your attention
  • 23× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/invition-print-ship/assets/woocommerce/email-tracktrace-plain.php
    • > /wp-content/plugins/invition-print-ship/assets/php/create-a-product/variable-step2.php
    • > /wp-content/plugins/invition-print-ship/assets/php/admin-notice.php
    • > /wp-content/plugins/invition-print-ship/assets/php/update-products-page.php
    • > /wp-content/plugins/invition-print-ship/assets/php/tools-page.php
    • > /wp-content/plugins/invition-print-ship/assets/php/create-a-product/product-step1.php
    • > /wp-content/plugins/invition-print-ship/assets/php/create-a-product/variable-step3.php
    • > /wp-content/plugins/invition-print-ship/assets/php/new-product-page.php
    • > /wp-content/plugins/invition-print-ship/invition-print-and-ship.php
    • > /wp-content/plugins/invition-print-ship/assets/php/admin-error-no-woocommerce.php
  • 122× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/invition-print-ship/includes/acf/includes/fields/class-acf-field-checkbox.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/invition-print-ship/includes/acf/includes/acf-form-functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/invition-print-ship/includes/acf/includes/admin/views/field-group-field-conditional-logic.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/invition-print-ship/lib/acf/core/fields/radio.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/invition-print-ship/includes/acf/includes/admin/views/html-location-rule.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/invition-print-ship/lib/acf/core/fields/checkbox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/invition-print-ship/includes/acf/includes/forms/form-attachment.php:33
    • > PHP Notice
      Undefined variable: active in wp-content/plugins/invition-print-ship/includes/acf/includes/admin/views/html-admin-tools.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/invition-print-ship/includes/acf/includes/admin/views/field-group-field.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/invition-print-ship/lib/acf/core/controllers/third_party.php:24

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools
    • > Network (severe)
    wp-admin/edit.php?post_type=acf-field-group&page=acf-tools - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: phone case, dropshipping, supplier, print on demand, dropship

invition-print-ship/invition-print-and-ship.php 85% from 13 tests

This is the main PHP file of "Printeers Print & Ship" version 1.16.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: The required version number must match the one declared in readme.txt ("4.9" instead of "4.0.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("invition-print-ship.php" instead of "invition-print-and-ship.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected146,226 lines of code in 400 files:
LanguageFilesBlank linesComment linesLines of code
PO File5532,90952,12070,119
JavaScript8212,45513,56235,844
PHP20215,48723,43628,447
CSS209585035,302
Sass151,4452185,058
HTML17902880
XML462117204
Ant1180164
JSON100124
SVG218170
Markdown111014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity17.02
▷ Minimum class complexity1.00
▷ Maximum class complexity119.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes146
▷ Abstract classes00.00%
▷ Concrete classes146100.00%
▷ Final classes00.00%
Methods988
▷ Static methods40.40%
▷ Public methods97298.38%
▷ Protected methods00.00%
▷ Private methods161.62%
Functions539
▷ Named functions53599.26%
▷ Anonymous functions40.74%
Constants18
▷ Global constants18100.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
26 PNG files occupy 0.26MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/acf/assets/inc/datepicker/images/ui-icons_444444_256x240.png3.68KB4.17KB0.00%
lib/acf/core/fields/date_picker/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
lib/acf/core/fields/date_picker/images/ui-bg_flat_55_5bc6f5_40x100.png0.21KB0.08KB▼ 59.15%
assets/images/simple-product.png114.48KB42.82KB▼ 62.60%
lib/acf/core/fields/date_picker/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%