84% display-webgl-shader

Code Review | Display WebGL Shader

WordPress plugin Display WebGL Shader scored84%from 54 tests.

About plugin

  • Plugin page: display-webgl-shader
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.9.0
  • WordPress version: 6.3.1
  • First release: Dec 22, 2021
  • Latest release: May 1, 2022
  • Number of updates: 10
  • Update frequency: every 14.9 days
  • Top authors: zebranorth (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,904 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.01MB] [CPU: ▼3.25ms] Passed 4 tests

A check of server-side resources used by Display WebGL Shader
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.52 ▲3.14
Dashboard /wp-admin3.32 ▲0.0156.29 ▲11.14
Posts /wp-admin/edit.php3.37 ▲0.0145.43 ▼2.41
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.86 ▼8.51
Media Library /wp-admin/upload.php3.24 ▲0.0131.51 ▼5.23

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Display WebGL Shader
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8613.38 ▼0.892.30 ▲0.5045.39 ▲0.79
Dashboard /wp-admin2,206 ▲214.87 ▼0.99111.26 ▲11.5641.18 ▲3.32
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0534.02 ▼9.0430.90 ▼5.90
Add New Post /wp-admin/post-new.php6,186 ▲4,66718.77 ▼4.44888.36 ▲298.1460.52 ▲8.99
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0294.64 ▼3.2659.19 ▲15.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-webgl-shader/display-webgl-shader.php:35

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (A shader in action.) image required
The official readme.txt is a good inspiration

display-webgl-shader/display-webgl-shader.php 92% from 13 tests

This is the main PHP file of "Display WebGL Shader" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.8.0" instead of "5.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin39,560 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JSON30034,638
JavaScript65812,9214,895
Sass22015
PHP232311
CSS2101

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.05MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png52.81KB55.83KB0.00%