83% printify-for-woocommerce

Code Review | Printify for WooCommerce

WordPress plugin Printify for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: printify-for-wooc...
  • Plugin version: 2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Sep 15, 2017
  • Latest release: Oct 31, 2023
  • Number of updates: 51
  • Update frequency: every 43.9 days
  • Top authors: printify (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

10,000+ active /132,156 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.01MB] [CPU: ▼11.45ms] Passed 4 tests

Analyzing server-side resources used by Printify for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.57 ▼0.88
Dashboard /wp-admin3.31 ▼0.0442.23 ▼27.03
Posts /wp-admin/edit.php3.36 ▲0.0047.68 ▼3.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.13 ▼14.50
Media Library /wp-admin/upload.php3.24 ▲0.0035.83 ▲0.76

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Printify for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.091.80 ▲0.0142.54 ▼0.74
Dashboard /wp-admin2,198 ▲185.51 ▼0.0297.40 ▼2.9642.36 ▲0.77
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0339.97 ▲1.5140.49 ▲4.64
Add New Post /wp-admin/post-new.php1,537 ▲918.23 ▼4.70620.09 ▼70.4775.25 ▲16.62
Media Library /wp-admin/upload.php1,403 ▼04.14 ▼0.0093.22 ▼7.8741.32 ▼5.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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/printify-for-woocommerce/includes/printify-shipping-method.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/printify-for-woocommerce/printify.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Contributors: The plugin contributors field is not present
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4 in printify-for-woocommerce/assets to your readme.txt
Please take inspiration from this readme.txt

printify-for-woocommerce/printify.php 92% from 13 tests

The principal PHP file in "Printify for WooCommerce" v. 2.8 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("printify-for-woocommerce.php" instead of "printify.php")

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
Everything looks great! No dangerous files found in this plugin228 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35413228

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity20.00
▷ Minimum class complexity3.00
▷ Maximum class complexity37.00
Average method complexity5.22
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/printify_logo.png0.94KB1.02KB0.00%