77% cloud-printing-for-woocommerce

Code Review | Cloud Printing for WooCommerce

WordPress plugin Cloud Printing for WooCommerce scored 77% from 54 tests.

About plugin

  • Plugin page: cloud-printing-fo...
  • Plugin version: 2.7.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-6.3
  • WordPress version: 6.3.1
  • First release: Mar 6, 2019
  • Latest release: Aug 11, 2023
  • Number of updates: 27
  • Update frequency: every 60.4 days
  • Top authors: printerco (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active / 2,337 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▲1.75ms] Passed 4 tests

A check of server-side resources used by Cloud Printing for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.49 ▼2.72
Dashboard /wp-admin3.31 ▲0.0144.18 ▼3.21
Posts /wp-admin/edit.php3.36 ▲0.0049.94 ▲6.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.55 ▲8.18
Media Library /wp-admin/upload.php3.23 ▲0.0038.80 ▲6.39

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cloud Printing for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.65 ▼0.661.92 ▼0.0239.41 ▼9.86
Dashboard /wp-admin2,203 ▲115.83 ▲0.90101.27 ▼12.3538.06 ▼4.18
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0342.50 ▲8.1634.21 ▲1.66
Add New Post /wp-admin/post-new.php1,533 ▲1323.08 ▼0.10649.94 ▼12.3761.74 ▼0.29
Media Library /wp-admin/upload.php1,382 ▼64.18 ▼0.0293.94 ▼5.1441.92 ▲0.85

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 were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cloud-printing-for-woocommerce/woocommerce-iconnect.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cloud-printing-for-woocommerce/includes/IconnectValidation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cloud-printing-for-woocommerce/includes/class-wc-iconnect.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cloud-printing-for-woocommerce/includes/printerco-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/cloud-printing-for-woocommerce/includes/printerco-email-editor.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cloud-printing-for-woocommerce/includes/printerco-orders.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cloud-printing-for-woocommerce/includes/PrintercoRefund.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cloud-printing-for-woocommerce/includes/printerco-dokan.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Contributors: The plugin tags were not defined
  • Contributors: Plugin contributors not specified
Please take inspiration from this readme.txt

cloud-printing-for-woocommerce/woocommerce-iconnect.php 85% from 13 tests

"Cloud Printing for WooCommerce" version 2.7.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 312 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cloud-printing-for-woocommerce.php" instead of "woocommerce-iconnect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,059 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP183591452,059

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.96
▷ Minimum class complexity1.00
▷ Maximum class complexity139.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces2
Traits1
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods71
▷ Static methods68.45%
▷ Public methods5476.06%
▷ Protected methods00.00%
▷ Private methods1723.94%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants51
▷ Global constants00.00%
▷ Class constants51100.00%
▷ Public constants51100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin