79% dark-mode

Code Review | WP Markdown Editor (Formerly Dark Mode)

WordPress plugin WP Markdown Editor (Formerly Dark Mode) scored79%from 54 tests.

About plugin

  • Plugin page: dark-mode
  • Plugin version: 4.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 10, 2017
  • Latest release: Apr 16, 2023
  • Number of updates: 69
  • Update frequency: every 29.3 days
  • Top authors: danieltj (46.38%)wppool (34.78%)azizultex (7.25%)princeahmed (7.25%)emrikol (7.25%)

Code review

54 tests

User reviews

74 reviews

Install metrics

1,000+ active /101,769 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.98ms] Passed 4 tests

This is a short check of server-side resources used by WP Markdown Editor (Formerly Dark Mode)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0934.33 ▼11.30
Dashboard /wp-admin3.51 ▲0.2058.20 ▼0.30
Posts /wp-admin/edit.php3.55 ▼0.3055.29 ▲2.49
Add New Post /wp-admin/post-new.php6.01 ▲0.1282.59 ▼28.47
Media Library /wp-admin/upload.php3.34 ▲0.1133.73 ▲0.17
WP Markdown Editor /wp-admin/options-general.php?page=wp-markdown-settings3.3645.21

Server storage [IO: ▲0.57MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 42 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
wpmde_general
dark_mode_install_time
dark_mode_version
db_upgraded
wp_markdown_editor_update_notice_interval
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Markdown Editor (Formerly Dark Mode)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,126 ▲36515.03 ▲0.721.87 ▲0.0941.45 ▼6.85
Dashboard /wp-admin2,540 ▲3696.41 ▲0.81117.74 ▲22.7744.12 ▼1.38
Posts /wp-admin/edit.php2,448 ▲3483.69 ▲1.6757.65 ▲25.0535.91 ▲2.58
Add New Post /wp-admin/post-new.php1,680 ▲15423.38 ▲0.65688.91 ▲88.6039.58 ▼5.15
Media Library /wp-admin/upload.php1,576 ▲1764.50 ▲0.2683.47 ▼15.4744.45 ▲2.92
WP Markdown Editor /wp-admin/options-general.php?page=wp-markdown-settings1,6263.6354.4279.13

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • wpmde_general
    • dark_mode_install_time
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • wp_markdown_editor_update_notice_interval
    • widget_recent-comments
    • dark_mode_version
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/dark-mode/includes/notices/affiliate-notice.php
    • > /wp-content/plugins/dark-mode/includes/notices/review-notice.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/dark-mode/includes/promo.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dark-mode/includes/class-settings.php:32

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: markdown, dark, editor, dashboard, markdown editor

dark-mode/dark-mode.php Passed 13 tests

The entry point to "WP Markdown Editor (Formerly Dark Mode)" version 4.1.5 is a PHP file that has certain tags in its header comment area
124 characters long description:
Quickly edit content in WordPress by getting an immersive, peaceful and natural writing experience with the coolest editor..

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
Everything looks great! No dangerous files found in this plugin6,196 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP181,0381,7944,008
Sass51,02001,837
SVG500165
CSS2134104
JavaScript4351282

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity27.38
▷ Minimum class complexity3.00
▷ Maximum class complexity91.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes215.38%
Methods194
▷ Static methods126.19%
▷ Public methods15680.41%
▷ Protected methods73.61%
▷ Private methods3115.98%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/timer.png2.39KB2.37KB▼ 0.98%