84% woo-3d-viewer

Code Review | Easy 3D Viewer

WordPress plugin Easy 3D Viewer scored84%from 54 tests.

About plugin

  • Plugin page: woo-3d-viewer
  • Plugin version: 1.8.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.4
  • WordPress version: 6.3.1
  • First release: May 24, 2017
  • Latest release: Nov 27, 2023
  • Number of updates: 110
  • Update frequency: every 21.6 days
  • Top authors: fuzzoid (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /30,165 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
Install script ran successfully

Server metrics [RAM: ▲0.54MB] [CPU: ▲4.48ms] Passed 4 tests

Analyzing server-side resources used by Easy 3D Viewer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4141.56 ▼0.53
Dashboard /wp-admin3.94 ▲0.6352.96 ▲6.17
Posts /wp-admin/edit.php3.99 ▲0.6356.60 ▲9.32
Add New Post /wp-admin/post-new.php6.45 ▲0.5786.13 ▲3.23
Media Library /wp-admin/upload.php3.77 ▲0.5438.84 ▲9.06

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 109 new files
Database: no new tables, 9 new options
New WordPress options
woo3dv_servers
woo3dv_version
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
woo3dv_settings
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Easy 3D Viewer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,112 ▲35017.02 ▲2.3151.95 ▲50.1038.58 ▼4.96
Dashboard /wp-admin2,372 ▲1956.42 ▲0.80121.38 ▲28.3642.72 ▼2.49
Posts /wp-admin/edit.php2,297 ▲1973.75 ▲1.7558.61 ▲18.0536.67 ▼2.14
Add New Post /wp-admin/post-new.php1,555 ▲2923.40 ▲0.16570.51 ▼29.3833.08 ▼23.63
Media Library /wp-admin/upload.php1,440 ▲404.46 ▲0.1884.84 ▼18.3342.28 ▼0.82

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: 9 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • woo3dv_version
    • woo3dv_settings
    • woo3dv_servers
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-3d-viewer/includes/woo3dv-functions.php:146

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: obj, model, woocommerce, 3d, stl...

woo-3d-viewer/woo-3d-viewer.php 92% from 13 tests

The main PHP file in "Easy 3D Viewer" ver. 1.8.5.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected21,744 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript357,2864,72117,941
PHP115799552,089
CSS18164911,056
Sass1881514
SVG301124
Markdown112020

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions58
▷ Named functions5696.55%
▷ Anonymous functions23.45%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
23 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/ext/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
includes/ext/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
includes/ext/jquery-ui/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
images/view3d.png2.78KB3.60KB0.00%
images/zoom_out.png0.56KB0.52KB▼ 8.01%