83% handprint

Code Review | Handprint

WordPress plugin Handprint scored83%from 54 tests.

About plugin

  • Plugin page: handprint
  • Plugin version: 1.3.3.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Jun 16, 2021
  • Latest release: Oct 29, 2022
  • Number of updates: 79
  • Update frequency: every 6.3 days
  • Top authors: handprintwp (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /3,013 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.70ms] Passed 4 tests

An overview of server-side resources used by Handprint
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.78 ▼4.99
Dashboard /wp-admin3.35 ▼0.0048.55 ▼15.84
Posts /wp-admin/edit.php3.40 ▲0.0446.89 ▲2.12
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.51 ▼11.55
Media Library /wp-admin/upload.php3.27 ▲0.0435.44 ▲1.60

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Handprint
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.381.63 ▼0.3841.07 ▼4.00
Dashboard /wp-admin2,192 ▲155.54 ▼0.0784.72 ▼16.5439.24 ▼2.19
Posts /wp-admin/edit.php2,097 ▼31.96 ▼0.0733.24 ▼0.3734.73 ▼3.28
Add New Post /wp-admin/post-new.php1,537 ▲1118.48 ▼4.55600.38 ▼81.1559.05 ▲2.83
Media Library /wp-admin/upload.php1,400 ▼04.18 ▲0.0193.08 ▼1.9843.40 ▲0.09

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/handprint/makepot.php' (include_path='.:/usr/share/php') in wp-content/plugins/handprint/add.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/handprint/templates/admin/cart/iframe.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/handprint/woocommerce-handprint.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/handprint/includes/admin/class-wc-admin-saas-integration.php:10
    • > PHP Warning
      require_once(wp-content/plugins/handprint/makepot.php): failed to open stream: No such file or directory in wp-content/plugins/handprint/add.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/handprint/templates/front/cart/iframe.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

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
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-1.png) image required
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

handprint/woocommerce-handprint.php 85% from 13 tests

"Handprint" version 1.3.3.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("handprint.php" instead of "woocommerce-handprint.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,064 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS1445558
PHP7122160459
PO File1171944
SVG1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity8.75
▷ Minimum class complexity5.00
▷ Maximum class complexity17.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.62MB with 0.28MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/front/images/shadow.png317.44KB175.16KB▼ 44.82%
assets/admin/images/shadow.png317.44KB175.16KB▼ 44.82%