72% shop-3d

Code Review | Shop3D - 3D Print on Demand

WordPress plugin Shop3D - 3D Print on Demand scored72%from 54 tests.

About plugin

  • Plugin page: shop-3d
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.5
  • WordPress version: 6.3.1
  • First release: Sep 25, 2020
  • Latest release: Sep 30, 2020
  • Number of updates: 11
  • Update frequency: every 0.5 days
  • Top authors: it3dc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,017 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.09ms] Passed 4 tests

Analyzing server-side resources used by Shop3D - 3D Print on Demand
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0537.25 ▼2.43
Dashboard /wp-admin3.36 ▲0.0546.20 ▲0.95
Posts /wp-admin/edit.php3.47 ▲0.1146.71 ▼0.84
Add New Post /wp-admin/post-new.php5.96 ▲0.0783.75 ▼14.03
Media Library /wp-admin/upload.php3.28 ▲0.0534.34 ▲1.11
Shop3D /wp-admin/admin.php?page=shop-3d3.2529.83

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Shop3D - 3D Print on Demand
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.89 ▼0.499.12 ▲7.3344.10 ▼1.02
Dashboard /wp-admin2,210 ▲225.86 ▲0.01105.31 ▲0.1337.81 ▼3.50
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0240.62 ▼0.2234.81 ▼2.93
Add New Post /wp-admin/post-new.php1,527 ▼118.76 ▲0.59590.06 ▼19.2354.57 ▲6.71
Media Library /wp-admin/upload.php1,389 ▲14.19 ▼0.0396.12 ▼10.3943.87 ▼0.55
Shop3D /wp-admin/admin.php?page=shop-3d87915.75701.4451.41

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 were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/shop-3d/public/partials/shop3d-woocommerce-extension-public-display.php
    • > /wp-content/plugins/shop-3d/admin/partials/shop3d-woocommerce-extension-admin-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/shop-3d/admin/shop3d_iframe.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=shop-3d
    • > Console-api (warning) in unknown
    https://app.shop3d.io/_nuxt/app.db44cc6.js 1:493772 "'state' should be a method that returns an object in store/platform/index.js"
    • > GET request to /wp-admin/admin.php?page=shop-3d
    • > Console-api (warning) in unknown
    https://app.shop3d.io/_nuxt/app.db44cc6.js 1:493772 "'state' should be a method that returns an object in store/platform/releaseNotes.js"
    • > GET request to /wp-admin/admin.php?page=shop-3d
    • > Console-api (warning) in unknown
    https://app.shop3d.io/_nuxt/app.db44cc6.js 1:493772 "'state' should be a method that returns an object in store/settings/subscriptions.js"

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

shop-3d/shop3d-woocommerce-extension.php 85% from 13 tests

The main PHP file in "Shop3D - 3D Print on Demand" ver. 1.0.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:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("shop-3d.php" instead of "shop3d-woocommerce-extension.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin188 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13121531182
JavaScript24546
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.16
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin