83% 3dvieweronline-wp

Code Review | 3DVieweronline

WordPress plugin 3DVieweronline scored83%from 54 tests.

About plugin

  • Plugin page: 3dvieweronline-wp
  • Plugin version: 2.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 29, 2016
  • Latest release: Aug 7, 2023
  • Number of updates: 60
  • Update frequency: every 42.3 days
  • Top authors: 3dvieweronline (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,829 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼3.98ms] Passed 4 tests

A check of server-side resources used by 3DVieweronline
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1641.86 ▼1.75
Dashboard /wp-admin4.82 ▲1.48184,252.87 ▲184,199.17
Posts /wp-admin/edit.php3.62 ▲0.2260.96 ▲4.54
Add New Post /wp-admin/post-new.php6.10 ▲0.1790.28 ▼19.13
Media Library /wp-admin/upload.php3.43 ▲0.1639.16 ▲0.43

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 50 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
settings-threed-iframe
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for 3DVieweronline
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲17713.60 ▼0.6211.03 ▲9.3540.87 ▼4.04
Dashboard /wp-admin2,206 ▲325.80 ▲0.1583.40 ▼10.3877.78 ▲33.75
Posts /wp-admin/edit.php2,129 ▲292.01 ▲0.0337.24 ▲1.1537.17 ▼0.92
Add New Post /wp-admin/post-new.php6,388 ▲4,86027.54 ▲4.60978.81 ▲286.2043.09 ▼25.08
Media Library /wp-admin/upload.php1,426 ▲264.15 ▼0.06116.99 ▲2.4168.59 ▲20.10

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/3dvieweronline-wp/admin/partials/threedvieweronline-iframe-admin-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: 3dvieweronline, 3d e-commerce, woocommerce 3d viewer, 3d product viewer, 3d viewer...

3dvieweronline-wp/threedvieweronline-iframe.php 77% from 13 tests

The main PHP file in "3DVieweronline" ver. 2.2.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 149 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("3dvieweronline-wp.php" instead of "threedvieweronline-iframe.php")

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
Good job! No executable or dangerous file extensions detected15,627 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
JSON2007,134
JavaScript101,2186714,113
SVG1002,671
CSS614127918
PHP12263590777
Sass11014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.57
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods60
▷ Static methods35.00%
▷ Public methods5388.33%
▷ Protected methods00.00%
▷ Private methods711.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/custom-icon.png1.53KB0.29KB▼ 80.80%
assets/images/icon.png1.03KB0.56KB▼ 46.07%
assets/images/logo.png0.46KB0.41KB▼ 12.24%