10% material3d

Code Review | Material3d

WordPress plugin Material3d scored10%from 54 tests.

About plugin

  • Plugin page: material3d
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Jan 13, 2021
  • Latest release: Jan 13, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: tonicraftor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /682 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.83MB] [CPU: ▼61.92ms] Passed 4 tests

This is a short check of server-side resources used by Material3d
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.86 ▼33.38
Dashboard /wp-admin2.22 ▼1.136.40 ▼61.50
Posts /wp-admin/edit.php2.22 ▼1.147.29 ▼50.75
Add New Post /wp-admin/post-new.php2.22 ▼3.677.35 ▼102.06
Media Library /wp-admin/upload.php2.22 ▼1.016.24 ▼28.82

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 88 new files
Database: 2 new tables, 6 new options
New tables
m3d_meta
m3d_scenes
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Material3d
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14214.73 ▼0.0319.97 ▲17.4451.78 ▲6.58
Dashboard /wp-admin2,258 ▲705.89 ▼0.01108.03 ▼22.6243.28 ▼6.51
Posts /wp-admin/edit.php2,144 ▲552.06 ▲0.0641.04 ▼6.8136.03 ▼1.99
Add New Post /wp-admin/post-new.php1,540 ▲2623.16 ▲5.44707.35 ▼24.8555.89 ▼8.24
Media Library /wp-admin/upload.php1,440 ▲524.21 ▲0.02112.24 ▼16.7647.67 ▼2.56
M3d Scenes /wp-admin/m3d-scenes.php260.440.1114.52
Help/Support /wp-admin/m3d-help.php260.440.118.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • Zombie tables detected upon uninstall: 2 tables
    • m3d_meta
    • m3d_scenes
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/material3d/admin/views/help.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/material3d/material3dwp.php:27

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/m3d-scenes.php
    • > Network (severe)
    wp-admin/m3d-scenes.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/m3d-help.php
    • > Network (severe)
    wp-admin/m3d-help.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: editor, virtual reality, particle, vr, animation...

material3d/material3dwp.php 77% from 13 tests

"Material3d" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 148 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("material3d.php" instead of "material3dwp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected8,022 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript16113494,162
SVG5014131,797
PHP66484981
CSS5925586
Sass4540496

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity25.00
▷ Minimum class complexity5.00
▷ Maximum class complexity45.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods30
▷ Static methods310.00%
▷ Public methods2893.33%
▷ Protected methods00.00%
▷ Private methods26.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin