83% 3d-viewer-block

Code Review | 3D Viewer Block - Display interactive 3D models on WordPress.

WordPress plugin 3D Viewer Block - Display interactive 3D models on WordPress. scored83%from 54 tests.

About plugin

  • Plugin page: 3d-viewer-block
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 13, 2021
  • Latest release: Oct 3, 2023
  • Number of updates: 33
  • Update frequency: every 20.0 days
  • Top authors: charlescormier (72.73%)abuhayat (30.3%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /7,050 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.30ms] Passed 4 tests

An overview of server-side resources used by 3D Viewer Block - Display interactive 3D models on WordPress.
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.47 ▼0.78
Dashboard /wp-admin3.35 ▲0.0046.67 ▼7.78
Posts /wp-admin/edit.php3.40 ▲0.0445.63 ▼5.18
Add New Post /wp-admin/post-new.php5.95 ▲0.0782.19 ▼15.47
Media Library /wp-admin/upload.php3.27 ▲0.0435.54 ▲2.35

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for 3D Viewer Block - Display interactive 3D models on WordPress.
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.141.73 ▼0.0143.66 ▼0.74
Dashboard /wp-admin2,206 ▲184.89 ▼0.0193.96 ▼9.2740.20 ▼3.36
Posts /wp-admin/edit.php2,092 ▼02.04 ▲0.0536.86 ▼5.4131.78 ▼8.03
Add New Post /wp-admin/post-new.php6,202 ▲4,68120.82 ▼2.31976.96 ▲319.4137.51 ▼21.43
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.03111.80 ▲10.9246.98 ▲3.67

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/3d-viewer-block/inc/block.php:6
    • > PHP Warning
      Use of undefined constant BP3D_VERSION - assumed 'BP3D_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/3d-viewer-block/dist/editor.asset.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Requires at least: Invalid plugin version format
Please take inspiration from this readme.txt

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

"3D Viewer Block - Display interactive 3D models on WordPress." version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("3d-viewer-block.php" instead of "plugin.php")
  • 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
No dangerous file extensions were detected645 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript345837384
PHP42418107
JSON20078
PO File1284974
CSS2022

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin