78% visual-text-editor

Code Review | Visual Text Editor

WordPress plugin Visual Text Editor scored 78% from 54 tests.

About plugin

  • Plugin page: visual-text-editor
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1+
  • WordPress version: 6.3.1
  • First release: Jul 29, 2016
  • Latest release: Feb 26, 2018
  • Number of updates: 53
  • Update frequency: every 10.9 days
  • Top authors: gk.loveweb (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 23,637 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.09MB] [CPU: ▼0.86ms] Passed 4 tests

Server-side resources used by Visual Text Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.61 ▼1.54
Dashboard /wp-admin3.38 ▲0.0853.69 ▲0.87
Posts /wp-admin/edit.php3.49 ▲0.1455.61 ▲2.23
Add New Post /wp-admin/post-new.php5.98 ▲0.09102.81 ▲10.53
Media Library /wp-admin/upload.php3.30 ▲0.0738.41 ▼4.99

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 12 new options
New WordPress options
db_upgraded
overlaycolor
autop
widget_theysaidso_widget
mediabuttons
visual_editor_mce
editorheight
can_compress_scripts
dragndrop
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Visual Text Editor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲5213.32 ▲0.071.82 ▼0.0441.91 ▼4.06
Dashboard /wp-admin2,235 ▲295.17 ▼0.68102.53 ▼3.2285.06 ▲42.25
Posts /wp-admin/edit.php2,135 ▲432.31 ▲0.3239.59 ▼5.1933.71 ▼5.77
Add New Post /wp-admin/post-new.php1,561 ▲2718.52 ▼5.00613.95 ▼72.0837.35 ▼21.76
Media Library /wp-admin/upload.php1,427 ▲364.32 ▲0.1090.50 ▼11.9282.67 ▲41.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 12 options in the database
    • dragndrop
    • visual_editor_mce
    • overlaycolor
    • can_compress_scripts
    • mediabuttons
    • widget_theysaidso_widget
    • widget_recent-comments
    • autop
    • db_upgraded
    • widget_recent-posts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/visual-text-editor/includes/class-admin.php
    • > /wp-content/plugins/visual-text-editor/includes/class-visual-editor.php
    • > /wp-content/plugins/visual-text-editor/visual-text-editor.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/visual-text-editor/includes/class-widget.php:7

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 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tested up to: Invalid version format
  • Tags: Please delete some tags, you are using 41 tag instead of maximum 10
You can take inspiration from this readme.txt

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

The main PHP script in "Visual Text Editor" version 1.2.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 154 characters long)

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
Success! There were no dangerous files found in this plugin786 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript273164345
PHP57338265
PO File24854116
CSS13060

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity5.67
▷ Minimum class complexity4.00
▷ Maximum class complexity7.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.31MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot/2.png167.70KB44.99KB▼ 73.17%
screenshot/3.png123.22KB35.30KB▼ 71.35%
screenshot/1.png19.25KB6.37KB▼ 66.90%
img/wpve-icon.png0.76KB0.71KB▼ 6.92%
img/uploader-icons.png1.52KB2.04KB0.00%