84% visual-editor

Code Review | Visual Editor For Gutenberg

WordPress plugin Visual Editor For Gutenberg scored 84% from 54 tests.

About plugin

  • Plugin page: visual-editor
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2022
  • Latest release: Mar 23, 2022
  • Number of updates: 14
  • Update frequency: every 1.6 days
  • Top authors: 4wpbari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 485 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
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▲3.27ms] Passed 4 tests

An overview of server-side resources used by Visual Editor For Gutenberg
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1349.69 ▲5.15
Dashboard /wp-admin3.41 ▲0.1153.23 ▲1.51
Posts /wp-admin/edit.php3.53 ▲0.1750.87 ▼0.58
Add New Post /wp-admin/post-new.php6.03 ▲0.14108.42 ▲7.00
Media Library /wp-admin/upload.php3.34 ▲0.1146.45 ▲10.64

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 73 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Visual Editor For Gutenberg
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,131 ▲34222.49 ▲9.23158.98 ▲156.7538.05 ▼3.71
Dashboard /wp-admin2,288 ▲825.87 ▲0.9996.83 ▼16.0138.79 ▼2.22
Posts /wp-admin/edit.php2,166 ▲772.07 ▲0.0736.57 ▼3.9135.46 ▼0.81
Add New Post /wp-admin/post-new.php6,512 ▲4,97923.03 ▼0.17968.18 ▲357.7947.21 ▼5.05
Media Library /wp-admin/upload.php1,462 ▲774.24 ▲0.0499.07 ▼21.5442.96 ▼2.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 18× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visual-editor/includes/patterns/visualedit_layout_01.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visual-editor/includes/patterns/visualedit_construction_01.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visual-editor/class-visual-editor-sidebar.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/visual-editor/includes/layout/class-visualedit-block-templates-image-importer.php on line 56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visual-editor/includes/patterns/sections/visualedit-faqs-section.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visual-editor/includes/patterns/sections/visualedit-feature-section.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visual-editor/includes/patterns/sections/visualedit-about-section.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visual-editor/includes/patterns/visualedit_corporate_01.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visual-editor/includes/patterns/sections/visualedit-hero-section.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VISUALEDIT\\Blocks\\Layouts\\add_action() in wp-content/plugins/visual-editor/includes/layout/register-layout-components.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: gutenberg, visual editor, editor

visual-editor/visual-editor.php 92% from 13 tests

The primary PHP file in "Visual Editor For Gutenberg" version 1.0.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin25,881 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3687746118,228
PHP241,0467154,616
CSS8146322,350
Sass21580687

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity19.86
▷ Minimum class complexity3.00
▷ Maximum class complexity49.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods55
▷ Static methods1730.91%
▷ Public methods5294.55%
▷ Protected methods00.00%
▷ Private methods35.45%
Functions39
▷ Named functions1025.64%
▷ Anonymous functions2974.36%
Constants14
▷ Global constants642.86%
▷ Class constants857.14%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
common-core/animation/images/count-animation.1151d25d.png33.99KB9.04KB▼ 73.40%
common-core/animation/images/typing-animation.d84cccd1.png58.81KB22.46KB▼ 61.82%