94% 3d-xr-library

Code Review | WordPress 3d Model Viewer

WordPress plugin WordPress 3d Model Viewer scored 94% from 54 tests.

About plugin

  • Plugin page: 3d-xr-library
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8.1
  • WordPress version: 5.9.2
  • First release: Jun 2, 2021
  • Latest release: Sep 13, 2021
  • Number of updates: 18
  • Update frequency: every 5.7 days
  • Top authors: viitorcloudvc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 289 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼301.12ms] Passed 4 tests

Server-side resources used by WordPress 3d Model Viewer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1052.56 ▲5.45
Dashboard /wp-admin3.50 ▲0.0938.48 ▲3.70
Posts /wp-admin/edit.php3.73 ▲0.0941.79 ▼2.06
Add New Post /wp-admin/post-new.php6.96 ▼0.0197.60 ▼1,203.12
Media Library /wp-admin/upload.php3.36 ▲0.0623.76 ▼2.98
All 3D Model /wp-admin/edit.php?post_type=vc3dmodels3.4930.03
Add New /wp-admin/post-new.php?post_type=vc3dmodels3.6542.34

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WordPress 3d Model Viewer: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,325 ▲60318.70 ▲2.6798.91 ▲93.0739.79 ▲37.55
Dashboard /wp-admin3,122 ▲2648.01 ▲1.83140.57 ▲4.28152.02 ▼7.61
Posts /wp-admin/edit.php2,954 ▲2665.18 ▲1.9583.97 ▲15.37154.99 ▲8.50
Add New Post /wp-admin/post-new.php1,688 ▲2016.26 ▼2.72398.51 ▲16.66154.64 ▼0.78
Media Library /wp-admin/upload.php1,736 ▲385.55 ▲0.03108.65 ▼25.37178.66 ▼21.39
All 3D Model /wp-admin/edit.php?post_type=vc3dmodels1,6555.1474.39113.67
Add New /wp-admin/post-new.php?post_type=vc3dmodels2,3205.4991.05150.34

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/3d-xr-library/3d-xr-library.php:13

User-side errors Passed 1 test

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

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
2 plugin tags: animation, 3dxrlibrary

3d-xr-library/3d-xr-library.php Passed 13 tests

The primary PHP file in "WordPress 3d Model Viewer" version 1.0.0 is used by WordPress to initiate all plugin functionality
55 characters long description:
Use this shortcode [3dmodelviewer] to display 3D Model.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin11,866 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,552
JavaScript6443,1201,798
PHP12928268
CSS4546248

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin