74% printaura-woocommerce-api

Code Review | Printaura-Woocommerce

WordPress plugin Printaura-Woocommerce scored74%from 54 tests.

About plugin

  • Plugin page: printaura-woocomm...
  • Plugin version: 4.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.3.0
  • WordPress version: 6.3.1
  • First release: Jun 27, 2019
  • Latest release: Nov 18, 2019
  • Number of updates: 8
  • Update frequency: every 18.1 days
  • Top authors: ryankikta (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /9,454 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.38MB] [CPU: ▲1.82ms] Passed 4 tests

Server-side resources used by Printaura-Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.88 ▲1.4247.69 ▲6.58
Dashboard /wp-admin4.72 ▲1.4151.25 ▲6.04
Posts /wp-admin/edit.php4.77 ▲1.4149.81 ▲0.70
Add New Post /wp-admin/post-new.php7.23 ▲1.3490.94 ▼6.04
Media Library /wp-admin/upload.php4.58 ▲1.3441.50 ▲8.10

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 13 new options
New WordPress options
printaura_woocommerce_api_mail_body
printaura_woocommerce_api_ips_allowed
printaura_woocommerce_api_token
widget_recent-posts
printaura_woocommerce_api_enabled
widget_theysaidso_widget
theysaidso_admin_options
tgm_plugins_printaura-woocommerce-api
can_compress_scripts
printaura_woocommerce_api_mail_from
...

Browser metrics Passed 4 tests

A check of browser resources used by Printaura-Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.68 ▼0.692.28 ▲0.4142.29 ▼2.10
Dashboard /wp-admin2,211 ▲235.04 ▼0.86100.03 ▼2.4240.61 ▼3.99
Posts /wp-admin/edit.php2,091 ▼12.04 ▼0.0235.55 ▼5.9931.98 ▼5.29
Add New Post /wp-admin/post-new.php1,536 ▼023.16 ▲0.20592.11 ▼35.7065.28 ▲14.97
Media Library /wp-admin/upload.php1,393 ▲84.21 ▼0.01102.12 ▼4.6242.00 ▼3.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/printaura-woocommerce-api/printaura-woocommerce-api.php+302
    Trying to get property 'term_id' of non-object
  • This plugin does not fully uninstall, leaving 13 options in the database
    • printaura_woocommerce_api_ips_allowed
    • db_upgraded
    • widget_recent-comments
    • tgm_plugins_printaura-woocommerce-api
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • printaura_woocommerce_api_mail_body
    • printaura_woocommerce_api_mail_from
    • can_compress_scripts
    • printaura_woocommerce_api_mail_subject
    • ...

Smoke tests 75% 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 50% 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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: helpers in wp-content/plugins/printaura-woocommerce-api/templates/mail_form.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function hiddenFormFields() on null in wp-content/plugins/printaura-woocommerce-api/templates/mail_form.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (The PrintAura-WooCommerce settings panel.)
Please take inspiration from this readme.txt

printaura-woocommerce-api/printaura-woocommerce-api.php Passed 13 tests

"Printaura-Woocommerce" version 4.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
38 characters long description:
PrintAura WooCommerce Integration API

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected8,691 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP366019558,654
CSS11037

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity24.03
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes00.00%
Methods327
▷ Static methods9228.13%
▷ Public methods31997.55%
▷ Protected methods82.45%
▷ Private methods00.00%
Functions101
▷ Named functions7473.27%
▷ Anonymous functions2726.73%
Constants23
▷ Global constants23100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.21MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png15.01KB6.14KB▼ 59.07%
assets/icon-256x256.png45.53KB16.94KB▼ 62.79%
assets/banner-772x250.png93.33KB37.24KB▼ 60.10%
assets/screenshot-1.PNG56.57KB30.46KB▼ 46.16%
assets/st-processing.png0.11KB0.11KB0.00%