87% udraw

Code Review | Web To Print Shop : uDraw

WordPress plugin Web To Print Shop : uDraw scored 87% from 53 tests.

About plugin

  • Plugin page: udraw
  • Plugin version: 3.3.0
  • PHP compatiblity: 7.1.30+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.7.2
  • WordPress version: 5.8.1
  • First release: Nov 11, 2015
  • Latest release: Jul 14, 2021
  • Number of updates: 156
  • Update frequency: every 13.3 days
  • Top authors: w2pshop (100%)

Code review

53 tests

User reviews

4 reviews

Install metrics

200+ active / 22,543 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Web To Print Shop : uDraw
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0231.67 ▼0.85
Dashboard /wp-admin3.14 ▲0.0944.20 ▲1.90
Posts /wp-admin/edit.php3.19 ▲0.0838.82 ▼3.68
Add New Post /wp-admin/post-new.php5.44 ▲0.0194.36 ▼1,049.45
Media Library /wp-admin/upload.php3.02 ▲0.0133.25 ▼6.16

Server storage [IO: ▲83.13MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • The filesystem usage should be lower than 25MB (currently using 83.13MB)
Filesystem: 3,076 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Web To Print Shop : uDraw
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,694 ▲8815.96 ▲0.427.69 ▼0.3346.71 ▼2.05
Dashboard /wp-admin2,951 ▲955.89 ▲0.04139.84 ▲1.7295.05 ▼6.56
Posts /wp-admin/edit.php2,727 ▲212.70 ▲0.0165.78 ▼4.1790.67 ▼4.70
Add New Post /wp-admin/post-new.php1,590 ▼26118.20 ▲0.48376.77 ▲6.28126.92 ▲23.15
Media Library /wp-admin/upload.php1,793 ▲215.04 ▲0.04148.37 ▼10.68107.25 ▼7.97

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 50% 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 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 items
  • 9× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/udraw/udraw-svg/SVGDesigner/skins/simple/designer.php
    • > /wp-content/plugins/udraw/templates/admin/uDraw-about.php
    • > /wp-content/plugins/udraw/price-matrix/templates/frontend/price-matrix.php
    • > /wp-content/plugins/udraw/udraw-svg/SVGDesigner/skins/widescreen/designer.php
    • > /wp-content/plugins/udraw/vendor/docraptor/docraptor/examples/sync.php
    • > /wp-content/plugins/udraw/assets/pdfjs/web/viewer.php
    • > /wp-content/plugins/udraw/vendor/docraptor/docraptor/examples/browser_download.php
    • > /wp-content/plugins/udraw/udraw-svg/SVGDesigner/skins/default/designer.php
    • > /wp-content/plugins/udraw/vendor/docraptor/docraptor/examples/async.php
  • 417× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant UDRAW_SVG_IMAGE_URL - assumed 'UDRAW_SVG_IMAGE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/udraw/udraw-svg/SVGDesigner/skins/default/designer.php on line 823
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/udraw/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/udraw/udraw-svg/classes/tables/svg_templates_table.class.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/udraw/udraw-svg/SVGDesigner/skins/widescreen/designer.php on line 391
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/udraw/vendor/guzzlehttp/psr7/src/FnStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'uDraw_Clipart_Table' not found in wp-content/plugins/udraw/templates/admin/uDraw-upload-clipart.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPEXCEL_ROOTPHPExcel/Shared/trend/bestFitClass.php' (include_path='.:/usr/share/php') in wp-content/plugins/udraw/assets/PHPExcel/Classes/PHPExcel/Shared/trend/exponentialBestFitClass.php on line 29
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/udraw/udraw-svg/classes/tables/svg_global_templates_table.class.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/udraw/udraw-svg/SVGDesigner/skins/simple/designer.php on line 458
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/udraw/assets/PHPExcel/Classes/PHPExcel/CachedObjectStorage/SQLite.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: graphic design, web to print, udraw, w2p shop, designer...

udraw/uDraw.php 85% from 13 tests

This is the main PHP file of "Web To Print Shop : uDraw" version 3.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "4.1")
  • Main file name: The principal plugin file should be the same as the plugin slug ("udraw.php" instead of "uDraw.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin383,710 lines of code in 2,408 files:
LanguageFilesBlank linesComment linesLines of code
Bourne Again Shell420880
Bourne Shell39433

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,176)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity43.92
▷ Minimum class complexity1.00
▷ Maximum class complexity1,176.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
▷ Abstract classes82.64%
▷ Concrete classes29597.36%
▷ Final classes72.37%
▷ Static methods74617.04%
▷ Public methods3,68484.17%
▷ Protected methods360.82%
▷ Private methods65715.01%
▷ Named functions10352.02%
▷ Anonymous functions9547.98%
▷ Global constants19320.69%
▷ Class constants74079.31%
▷ Public constants740100.00%

Plugin size 0% from 1 test

Image compression 0% from 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
269 PNG files occupy 26.64MB with 13.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
udraw-svg/SVGDesigner/images/lighten.png1,912.77KB697.45KB▼ 63.54%
designer/includes/img/png-72_32.png7.37KB4.16KB▼ 43.54%
designer/includes/img/bg_btn_align_center.png1.09KB0.22KB▼ 79.82%
assets/jQuery-smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%