83% printcart-integration

Code Review | Printcart Web to Print Product Designer for WooCommerce

WordPress plugin Printcart Web to Print Product Designer for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: printcart-integra...
  • Plugin version: 2.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 18, 2022
  • Latest release: Nov 18, 2023
  • Number of updates: 26
  • Update frequency: every 20.0 days
  • Top authors: printcart (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /3,037 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
Installer ran successfully

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

This is a short check of server-side resources used by Printcart Web to Print Product Designer for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0032.72 ▼10.04
Dashboard /wp-admin3.31 ▲0.0046.36 ▼5.38
Posts /wp-admin/edit.php3.36 ▲0.0044.43 ▼1.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.53 ▼4.42
Media Library /wp-admin/upload.php3.23 ▲0.0036.10 ▲2.00

Server storage [IO: ▲0.21MB] [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: 34 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
printcart_plugin_do_activation_redirect
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Printcart Web to Print Product Designer for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.27 ▼0.401.63 ▼0.1140.09 ▼5.12
Dashboard /wp-admin2,198 ▲215.58 ▼0.0496.25 ▼3.0539.99 ▼2.43
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0139.28 ▲0.2636.03 ▼3.66
Add New Post /wp-admin/post-new.php1,539 ▲325.29 ▲2.30661.59 ▼146.6573.68 ▲9.90
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0296.47 ▼4.3943.56 ▲0.14

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • printcart_plugin_do_activation_redirect
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/printcart-integration/printcart-design.php:20

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

printcart-integration/printcart-design.php 85% from 13 tests

"Printcart Web to Print Product Designer for WooCommerce" version 2.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("printcart-integration.php" instead of "printcart-design.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "6.0.0")

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
There were no executable files found in this plugin3,122 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP20249842,161
CSS2131533
JavaScript4280357
SVG20166
JSON1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity40.14
▷ Minimum class complexity7.00
▷ Maximum class complexity109.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods101
▷ Static methods3332.67%
▷ Public methods101100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin