79% emb3d-model-viewer

Code Review | Emb3D Model Viewer

WordPress plugin Emb3D Model Viewer scored79%from 54 tests.

About plugin

  • Plugin page: emb3d-model-viewer
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2022
  • Latest release: Jan 25, 2023
  • Number of updates: 16
  • Update frequency: every 5.6 days
  • Top authors: netfarm (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,250 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼0.59ms] Passed 4 tests

Server-side resources used by Emb3D Model Viewer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1337.17 ▼4.00
Dashboard /wp-admin3.52 ▲0.2255.23 ▲7.41
Posts /wp-admin/edit.php3.58 ▲0.2259.00 ▲10.78
Add New Post /wp-admin/post-new.php6.04 ▲0.1596.30 ▼7.38
Media Library /wp-admin/upload.php3.37 ▲0.1438.12 ▲1.60
Overview /wp-admin/admin.php?page=emb3d-model-viewer3.3838.08
Upgrade to Premium /wp-admin/admin.php?page=emv-upgrade3.2124.76

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Emb3D Model Viewer: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲21815.69 ▲1.426.16 ▲4.5941.32 ▲0.10
Dashboard /wp-admin2,385 ▲2116.22 ▲0.61110.41 ▲21.0241.88 ▼2.75
Posts /wp-admin/edit.php2,311 ▲2113.35 ▲1.3657.95 ▲21.4535.94 ▼1.49
Add New Post /wp-admin/post-new.php1,554 ▲2823.34 ▲0.35668.62 ▲9.5837.03 ▼18.95
Media Library /wp-admin/upload.php1,452 ▲524.19 ▲0.0082.87 ▼24.6544.79 ▼0.46
Overview /wp-admin/admin.php?page=emb3d-model-viewer2,60510.14193.06111.58
Upgrade to Premium /wp-admin/admin.php?page=emv-upgrade1,30019.83678.50192.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: registration_key in wp-content/plugins/emb3d-model-viewer/public/partials/emb3d-model-viewer-woo.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/emb3d-model-viewer/admin/partials/emb3d-model-viewer-meta-box-output.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/emb3d-model-viewer/includes/class-emb3d-model-viewer-widget.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/emb3d-model-viewer/admin/partials/emb3d-model-viewer-overview.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Emb3D' not found in wp-content/plugins/emb3d-model-viewer/public/partials/emb3d-model-viewer-woo.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=emv-upgrade
    • > Rendering (warning) in unknown
    https://www.emb3d.com/emb3d-plugin-wordpress/?hostname=wp.com - [.WebGL-0x3c2404e63800]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels
    • > GET request to /wp-admin/admin.php?page=emv-upgrade
    • > Rendering (warning) in unknown
    https://www.emb3d.com/emb3d-plugin-wordpress/?hostname=wp.com - [.WebGL-0x3c2404e63800]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels (this message will no longer repeat)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: 3d, 3d model viewer, widget

emb3d-model-viewer/emb3d-model-viewer.php Passed 13 tests

"Emb3D Model Viewer" version 1.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
45 characters long description:
3D Model Viewer for Woocommerce and Elementor

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
Everything looks great! No dangerous files found in this plugin2,933 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript6752861,591
PHP13165487958
CSS3567257
PO File14965124
JSON3003

PHP code Passed 2 tests

This is a very shot 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.27
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods50
▷ Static methods24.00%
▷ Public methods4284.00%
▷ Protected methods36.00%
▷ Private methods510.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants31
▷ Global constants00.00%
▷ Class constants31100.00%
▷ Public constants31100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.35MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/mobile-emb3d.png337.75KB94.05KB▼ 72.15%
public/images/media/model.png0.62KB0.64KB0.00%
admin/images/logo.png24.32KB9.99KB▼ 58.94%