77% printy6-print-on-demand

Code Review | Printy6 - Print on demand

WordPress plugin Printy6 - Print on demand scored 77% from 54 tests.

About plugin

  • Plugin page: printy6-print-on-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.8
  • WordPress version: 6.3.1
  • First release: Jan 8, 2022
  • Latest release: Jan 8, 2022
  • Number of updates: 12
  • Update frequency: N/A
  • Top authors: printy666 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active / 864 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 gracefully, with no errors

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

This is a short check of server-side resources used by Printy6 - Print on demand
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.42 ▼4.62
Dashboard /wp-admin3.33 ▲0.0245.20 ▼3.94
Posts /wp-admin/edit.php3.44 ▲0.0843.62 ▼0.84
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.10 ▼1.20
Media Library /wp-admin/upload.php3.25 ▲0.0233.23 ▼3.25

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Printy6 - Print on demand
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲7113.77 ▼1.061.90 ▼0.8947.75 ▲0.37
Dashboard /wp-admin2,239 ▲365.84 ▲0.9897.02 ▼16.9380.87 ▲38.02
Posts /wp-admin/edit.php2,125 ▲362.02 ▲0.0036.52 ▲2.5235.64 ▼0.92
Add New Post /wp-admin/post-new.php1,541 ▲2717.60 ▼0.09685.21 ▲15.8550.83 ▼10.56
Media Library /wp-admin/upload.php1,424 ▲394.14 ▼0.0896.74 ▼14.3777.59 ▲28.26

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • woocommerce_printy6_settings
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/printy6-print-on-demand/bootstrap.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/printy6-print-on-demand/views/requirements-error.php:12
    • > PHP Warning
      Use of undefined constant PT6WC_REQUIRED_PHP_VERSION - assumed 'PT6WC_REQUIRED_PHP_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/printy6-print-on-demand/views/requirements-error.php on line 6
    • > PHP Warning
      Use of undefined constant PT6WC_REQUIRED_WP_VERSION - assumed 'PT6WC_REQUIRED_WP_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/printy6-print-on-demand/views/requirements-error.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_REST_Controller' not found in wp-content/plugins/printy6-print-on-demand/classes/pt6wc-rest-api-controller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PT6WC_Module' not found in wp-content/plugins/printy6-print-on-demand/classes/pt6wc-base.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/printy6-print-on-demand/views/pt6wc-connect/page-connect.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PT6_Base' not found in wp-content/plugins/printy6-print-on-demand/views/pt6wc-dashboard/page-dashboard.php:18
    • > PHP Warning
      Use of undefined constant PT6WC_NAME - assumed 'PT6WC_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/printy6-print-on-demand/views/requirements-error.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Plugin Name: Please specify the plugin name on the first line ( === printy6-print-on-demand === )
The official readme.txt might help

printy6-print-on-demand/bootstrap.php 77% from 13 tests

The principal PHP file in "Printy6 - Print on demand" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.3" instead of "3.0.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("printy6-print-on-demand.php" instead of "bootstrap.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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,257 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP9193415873
SVG331281
Markdown128063
CSS27038
JavaScript2022

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.80
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods76
▷ Static methods1621.05%
▷ Public methods6788.16%
▷ Protected methods810.53%
▷ Private methods11.32%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants838.10%
▷ Class constants1361.90%
▷ Public constants13100.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
assets/images/printy6-menu-icon.png0.87KB1.08KB0.00%