72% wp-editormd

Code Review | WP Editor.md - The Perfect WordPress Markdown Editor

WordPress plugin WP Editor.md - The Perfect WordPress Markdown Editor scored72%from 54 tests.

About plugin

  • Plugin page: wp-editormd
  • Plugin version: 10.2.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2017
  • Latest release: Nov 20, 2022
  • Number of updates: 157
  • Update frequency: every 13.4 days
  • Top authors: jaxsonwang (94.9%)lurenjiasworld (5.73%)

Code review

54 tests

User reviews

19 reviews

Install metrics

1,000+ active /106,747 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.50MB] [CPU: ▲68.88ms] Passed 4 tests

A check of server-side resources used by WP Editor.md - The Perfect WordPress Markdown Editor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.18 ▲0.7247.35 ▲6.76
Dashboard /wp-admin4.62 ▲1.31165.78 ▲115.71
Posts /wp-admin/edit.php4.67 ▲1.31147.96 ▲95.24
Add New Post /wp-admin/post-new.php4.64 ▼1.24168.94 ▲62.65
Media Library /wp-admin/upload.php4.46 ▲1.23149.23 ▲110.85
WP Editor.md /wp-admin/options-general.php?page=wp-editormd-settings2.4610.00

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2,341 new files
Database: no new tables, 16 new options
New WordPress options
editor_mermaid
editor_emoji
widget_theysaidso_widget
editor_style
editor_latex
editor_mindmap
widget_recent-posts
editor_version
syntax_highlighting
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by WP Editor.md - The Perfect WordPress Markdown Editor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,215 ▲45417.05 ▲2.6824.39 ▲22.7243.32 ▼1.17
Dashboard /wp-admin2,426 ▲2206.77 ▲0.86141.45 ▲35.6241.29 ▼2.58
Posts /wp-admin/edit.php2,329 ▲2293.84 ▲1.8164.04 ▲24.5033.67 ▼1.55
Add New Post /wp-admin/post-new.php3,071 ▲1,5455.41 ▼12.26104.35 ▼572.48110.04 ▲55.75
Media Library /wp-admin/upload.php1,462 ▲624.46 ▲0.1891.04 ▼23.8743.33 ▼3.40
WP Editor.md /wp-admin/options-general.php?page=wp-editormd-settings2,3476.30109.80107.15

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wp-editormd-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jQuery.Modal handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=wp-editormd-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jQuery.Modal handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-editormd/src/Utils/Settings/settings.css.php
    • > /wp-content/plugins/wp-editormd/vendor/michelf/php-markdown/Readme.php
  • 30× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_EDITORMD_VER - assumed 'WP_EDITORMD_VER' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-editormd/src/Utils/Settings/settings.js.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EditormdRoot\\plugins_url() in wp-content/plugins/wp-editormd/wp-editormd.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\HtmlConverterInterface' not found in wp-content/plugins/wp-editormd/vendor/league/html-to-markdown/src/HtmlConverter.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/wp-editormd/vendor/league/html-to-markdown/src/Converter/CodeConverter.php:7
    • > PHP Warning
      Use of undefined constant WP_EDITORMD_VER - assumed 'WP_EDITORMD_VER' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-editormd/src/Utils/Settings/settings.js.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/wp-editormd/vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/wp-editormd/vendor/league/html-to-markdown/src/Converter/HeaderConverter.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/wp-editormd/vendor/league/html-to-markdown/src/Converter/ParagraphConverter.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/wp-editormd/uninstall.php:10
    • > PHP Notice
      Undefined variable: editor_style_base_address in wp-content/plugins/wp-editormd/src/Utils/Settings/settings.js.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Editor.md Interface - Edit Mode)
You can take inspiration from this readme.txt

wp-editormd/wp-editormd.php 85% from 13 tests

The principal PHP file in "WP Editor.md - The Perfect WordPress Markdown Editor" v. 10.2.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Git Repository: Please do not include Git repositories in your plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin225,061 lines of code in 1,289 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript75228,89536,705159,589
HTML2235,04111525,266
SVG90012,450
PHP791,7063,5567,574
CSS1151,0055106,338
Sass141,187444,519
Markdown2290003,549
JSON11802,611
XHTML571,02402,560
PO File22294510
YAML46872
XML11023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.30
▷ Minimum class complexity1.00
▷ Maximum class complexity121.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces13
Interfaces5
Traits0
Classes55
▷ Abstract classes00.00%
▷ Concrete classes55100.00%
▷ Final classes11.82%
Methods445
▷ Static methods163.60%
▷ Public methods28964.94%
▷ Protected methods11926.74%
▷ Private methods378.31%
Functions15
▷ Named functions746.67%
▷ Anonymous functions853.33%
Constants19
▷ Global constants842.11%
▷ Class constants1157.89%
▷ Public constants11100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
898 PNG files occupy 4.01MB with 1.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Emojify.js/images/basic/part_alternation_mark.png2.62KB1.93KB▼ 26.15%
assets/Emojify.js/images/basic/laughing.png6.20KB3.12KB▼ 49.69%
assets/Emojify.js/images/basic/sunny.png3.71KB2.42KB▼ 34.85%
assets/Emojify.js/images/basic/droplet.png3.07KB2.26KB▼ 26.35%
assets/Emojify.js/images/basic/o.png2.48KB2.16KB▼ 12.81%