10% 3d-viewer

Code Review | 3D viewer - Embed 3D Models

WordPress plugin 3D viewer - Embed 3D Models scored 10% from 54 tests.

About plugin

  • Plugin page: 3d-viewer
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9
  • WordPress version: 5.9.2
  • First release: Apr 7, 2021
  • Latest release: Mar 9, 2022
  • Number of updates: 83
  • Update frequency: every 4.1 days
  • Top authors: srabonr (55.42%)abuhayat (28.92%)btechnologies (18.07%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active / 9,489 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/3d-viewer/3d-viewer.php+151
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲4.62MB] [CPU: ▼268.40ms] Passed 4 tests

Server-side resources used by 3D viewer - Embed 3D Models
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.38 ▲4.8684.45 ▲36.17
Dashboard /wp-admin8.40 ▲4.9964.17 ▲31.98
Posts /wp-admin/edit.php8.40 ▲4.7570.09 ▲33.60
Add New Post /wp-admin/post-new.php10.85 ▲3.87119.88 ▼1,164.90
Media Library /wp-admin/upload.php8.40 ▲5.1049.76 ▲25.71
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.4048.54

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 333 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for 3D viewer - Embed 3D Models
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,007 ▲26519.39 ▲3.3076.47 ▲70.862.88 ▲0.73
Dashboard /wp-admin2,963 ▲1026.06 ▼0.10116.41 ▼20.53173.77 ▲7.56
Posts /wp-admin/edit.php2,759 ▲743.25 ▲0.0068.22 ▲4.68160.08 ▲10.77
Add New Post /wp-admin/post-new.php1,701 ▲4015.58 ▼0.52442.23 ▼9.22163.28 ▲6.51
Media Library /wp-admin/upload.php1,766 ▲685.56 ▲0.02148.01 ▲6.15207.34 ▲17.58
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,4922.5454.84107.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/3d-viewer/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 6 options in the database
    • fs_debug_mode
    • bp3d_imported
    • fs_gdpr
    • fs_accounts
    • fs_active_plugins
    • _bp3d_settings_

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/3d-viewer/inc/mimes/enable-mime-type.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/3d-viewer/inc/viewer-data-importer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/3d-viewer/public/shortcode/shortcode.php:90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/3d-viewer/inc/bp3d-product-viewer.php:124
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/3d-viewer/admin/ads/submenu.php:10

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: widget, 3d model viewer, display, threejs, 3d

3d-viewer/3d-viewer.php 85% from 13 tests

Analyzing the main PHP file in "3D viewer - Embed 3D Models" version 1.2.7
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected59,649 lines of code in 264 files:
LanguageFilesBlank linesComment linesLines of code
PO File203,1973,5946,490

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity53.24
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
▷ Abstract classes43.81%
▷ Concrete classes10196.19%
▷ Final classes00.00%
▷ Static methods21515.57%
▷ Public methods1,04175.38%
▷ Protected methods151.09%
▷ Private methods32523.53%
▷ Named functions14197.92%
▷ Anonymous functions32.08%
▷ Global constants10180.16%
▷ Class constants2519.84%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
public/transparent.png0.14KB0.13KB▼ 3.60%