84% web-to-print-shop-udraw-widescreen-ui

Code Review | Web To Print Shop : uDraw - Widescreen UI

WordPress plugin Web To Print Shop : uDraw - Widescreen UI scored84%from 54 tests.

About plugin

  • Plugin page: web-to-print-shop...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9
  • WordPress version: 6.3.1
  • First release: Aug 18, 2016
  • Latest release: Feb 13, 2018
  • Number of updates: 10
  • Update frequency: every 54.4 days
  • Top authors: w2pshop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,065 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.00MB] [CPU: ▼7.36ms] Passed 4 tests

Server-side resources used by Web To Print Shop : uDraw - Widescreen UI
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.75 ▼2.58
Dashboard /wp-admin3.31 ▲0.0043.67 ▼4.77
Posts /wp-admin/edit.php3.36 ▲0.0042.96 ▼3.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.38 ▼17.45
Media Library /wp-admin/upload.php3.23 ▲0.0034.34 ▼3.69

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Web To Print Shop : uDraw - Widescreen UI: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.37 ▲0.021.58 ▲0.0339.72 ▲3.56
Dashboard /wp-admin2,203 ▲225.62 ▼0.1491.09 ▼13.5238.31 ▼2.06
Posts /wp-admin/edit.php2,112 ▲122.01 ▲0.0141.79 ▲4.0934.83 ▼5.62
Add New Post /wp-admin/post-new.php1,536 ▲722.91 ▼0.31685.20 ▲22.0756.07 ▼7.78
Media Library /wp-admin/upload.php1,405 ▲54.19 ▼0.02103.86 ▼0.6749.49 ▼0.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      include_once(): Failed opening 'UDRAW_PLUGIN_DIR/designer/designer-header-init.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/web-to-print-shop-udraw-widescreen-ui/skin/designer.php on line 3
    • > PHP Warning
      Use of undefined constant UDRAW_PLUGIN_DIR - assumed 'UDRAW_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/web-to-print-shop-udraw-widescreen-ui/skin/designer.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/web-to-print-shop-udraw-widescreen-ui/web-to-print-shop-udraw-widescreen-ui.php:17
    • > PHP Warning
      include_once(UDRAW_PLUGIN_DIR/designer/designer-header-init.php): failed to open stream: No such file or directory in wp-content/plugins/web-to-print-shop-udraw-widescreen-ui/skin/designer.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'uDraw' not found in wp-content/plugins/web-to-print-shop-udraw-widescreen-ui/skin/designer.php:8

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === web-to-print-shop-udraw-widescreen-ui === )
The official readme.txt is a good inspiration

web-to-print-shop-udraw-widescreen-ui/web-to-print-shop-udraw-widescreen-ui.php 92% from 13 tests

The main PHP file in "Web To Print Shop : uDraw - Widescreen UI" ver. 1.3.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "4.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin2,480 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP263191,230
CSS1216639
SVG101440
JavaScript148171

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.91
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin