52% dropship-sell-your-art

Code Review | Dropship Sell Your Art

WordPress plugin Dropship Sell Your Art scored52%from 54 tests.

About plugin

  • Plugin page: dropship-sell-you...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 17, 2022
  • Latest release: Oct 24, 2022
  • Number of updates: 4
  • Update frequency: every 56.7 days
  • Top authors: aarushmalik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /221 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▲296.37ms] 50% from 4 tests

Analyzing server-side resources used by Dropship Sell Your Art
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 644.86ms on /wp-admin/admin.php?page=printful-settings)
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 296.37ms on /wp-admin/admin.php?page=printful-settings)
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.47364.40 ▲316.03
Dashboard /wp-admin3.77 ▲0.47360.30 ▲305.01
Posts /wp-admin/edit.php3.82 ▲0.47349.33 ▲298.07
Add New Post /wp-admin/post-new.php6.37 ▲0.49388.33 ▲286.44
Media Library /wp-admin/upload.php3.70 ▲0.47332.95 ▲295.94
Dropship Sell Your Art /wp-admin/admin.php?page=printful3.62633.10
Settings /wp-admin/admin.php?page=printful-settings3.62644.86

Server storage [IO: ▲3.97MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 1,150 new files
Database: 5 new tables, 6 new options
New tables
wp_canvas_prints_auth
wp_canvas_prints_payment_keys
wp_canvas_prints_store
wp_canvas_prints_products
wp_canvas_prints_orders
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Dropship Sell Your Art
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,037 ▲26616.55 ▲2.19166.30 ▲164.2547.90 ▲4.15
Dashboard /wp-admin2,232 ▲475.91 ▲1.03110.18 ▲6.5178.61 ▲30.21
Posts /wp-admin/edit.php2,133 ▲441.97 ▼0.0834.92 ▼4.1035.52 ▼4.22
Add New Post /wp-admin/post-new.php1,550 ▲2221.61 ▲3.39749.39 ▲138.8452.97 ▼7.47
Media Library /wp-admin/upload.php1,423 ▲354.18 ▼0.0598.64 ▼5.8869.91 ▲22.92
Dropship Sell Your Art /wp-admin/admin.php?page=printful8982.0325.8677.29
Settings /wp-admin/admin.php?page=printful-settings8982.0326.9045.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 5 tables in the database
    • wp_canvas_prints_store
    • wp_canvas_prints_auth
    • wp_canvas_prints_orders
    • wp_canvas_prints_products
    • wp_canvas_prints_payment_keys
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=printful-settings
    • > Notice in wp-content/plugins/dropship-sell-your-art/includes/db.php+95
    Undefined offset: 0
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=printful-settings
    • > Notice in wp-content/plugins/dropship-sell-your-art/includes/db.php+95
    Trying to get property 'currency' of non-object

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 take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/dropship-sell-your-art/vendor/stripe/stripe-php/build.php
    • > /wp-content/plugins/dropship-sell-your-art/vendor/stripe/stripe-php/update_certs.php
  • 674× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Omnipay\\Stripe\\Message\\AbstractRequest' not found in wp-content/plugins/dropship-sell-your-art/vendor/omnipay/stripe/src/Message/FetchInvoiceLinesRequest.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\StreamFactory' not found in wp-content/plugins/dropship-sell-your-art/vendor/php-http/message/src/StreamFactory/GuzzleStreamFactory.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Omnipay\\Tests\\TestCase' not found in wp-content/plugins/dropship-sell-your-art/vendor/omnipay/stripe/tests/Message/FetchBalanceTransactionTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/dropship-sell-your-art/vendor/stripe/stripe-php/lib/Service/CouponService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\StripeObject' not found in wp-content/plugins/dropship-sell-your-art/vendor/stripe/stripe-php/lib/SearchResult.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Omnipay\\Common\\Message\\ResponseInterface' not found in wp-content/plugins/dropship-sell-your-art/vendor/omnipay/common/src/Common/Message/RedirectResponseInterface.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/dropship-sell-your-art/vendor/stripe/stripe-php/lib/BalanceTransaction.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\RequestMatcher' not found in wp-content/plugins/dropship-sell-your-art/vendor/php-http/message/src/RequestMatcher/RequestMatcher.php:14
    • > PHP Warning
      Use of undefined constant DROPSHIP_SYA_VERSION - assumed 'DROPSHIP_SYA_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/dropship-sell-your-art/templates/settings.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Omnipay\\Stripe\\Message\\AbstractRequest' not found in wp-content/plugins/dropship-sell-your-art/vendor/omnipay/stripe/src/Message/Checkout/AbstractRequest.php:19

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Contributors: The plugin contributors field is missing
The official readme.txt might help

dropship-sell-your-art/canvas-prints.php 92% from 13 tests

"Dropship Sell Your Art" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dropship-sell-your-art.php" instead of "canvas-prints.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Please fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/dropship-sell-your-art/vendor/stripe/stripe-php/data/ca-certificates.crt
62,208 lines of code in 985 files:
LanguageFilesBlank linesComment linesLines of code
PHP89011,57334,32550,336
Markdown442,96706,647
JSON30003,078
CSS221335928
JavaScript411425914
Bourne Shell22545101
YAML716389
XML40077
make214038

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.95
▷ Minimum class complexity1.00
▷ Maximum class complexity242.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces107
Interfaces78
Traits18
Classes730
▷ Abstract classes253.42%
▷ Concrete classes70596.58%
▷ Final classes13318.87%
Methods4,272
▷ Static methods52812.36%
▷ Public methods3,86590.47%
▷ Protected methods1653.86%
▷ Private methods2425.66%
Functions333
▷ Named functions19157.36%
▷ Anonymous functions14242.64%
Constants1,107
▷ Global constants100.90%
▷ Class constants1,09799.10%
▷ Public constants1,07597.99%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/brand-icon.png53.85KB25.20KB▼ 53.20%