83% ultimate-markdown

Code Review | Ultimate Markdown

WordPress plugin Ultimate Markdown scored83%from 54 tests.

About plugin

  • Plugin page: ultimate-markdown
  • Plugin version: 1.12
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 4, 2021
  • Latest release: Nov 8, 2023
  • Number of updates: 10
  • Update frequency: every 73.5 days
  • Top authors: daext (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /5,297 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.44ms] Passed 4 tests

An overview of server-side resources used by Ultimate Markdown
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.10 ▼10.33
Dashboard /wp-admin3.35 ▲0.0545.55 ▼5.56
Posts /wp-admin/edit.php3.41 ▲0.0547.47 ▼2.14
Add New Post /wp-admin/post-new.php5.96 ▲0.0884.91 ▼11.74
Media Library /wp-admin/upload.php3.28 ▲0.0535.97 ▼0.18
Options /wp-admin/admin.php?page=daextulma-options3.2831.51
Pro Version /wp-admin/admin.php?page=daextulma-pro-version3.2929.29
Export /wp-admin/admin.php?page=daextulma-export3.2729.53
Documents /wp-admin/admin.php?page=daextulma-documents3.3933.95
Help /wp-admin/admin.php?page=daextulma-help3.2735.68
Import /wp-admin/admin.php?page=daextulma-import3.2931.78

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 539 new files
Database: 1 new table, 10 new options
New tables
wp_daextulma_document
New WordPress options
widget_theysaidso_widget
widget_recent-posts
daextulma_import_menu_required_capability
can_compress_scripts
theysaidso_admin_options
daextulma_database_version
widget_recent-comments
daextulma_documents_menu_required_capability
db_upgraded
daextulma_export_menu_required_capability

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ultimate Markdown
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲20214.32 ▲0.181.59 ▼0.1238.82 ▼7.85
Dashboard /wp-admin2,369 ▲1925.60 ▼0.0489.73 ▲0.5239.19 ▼4.52
Posts /wp-admin/edit.php2,275 ▲1752.04 ▲0.0536.39 ▼9.7634.39 ▼3.95
Add New Post /wp-admin/post-new.php1,592 ▲6623.47 ▲0.34659.92 ▲25.0657.19 ▲4.28
Media Library /wp-admin/upload.php1,575 ▲1754.17 ▲0.0396.43 ▼3.7343.01 ▼1.54
Options /wp-admin/admin.php?page=daextulma-options1,0311.8127.5032.69
Pro Version /wp-admin/admin.php?page=daextulma-pro-version1,0412.1624.6628.70
Export /wp-admin/admin.php?page=daextulma-export9572.0225.6225.64
Documents /wp-admin/admin.php?page=daextulma-documents1,1222.6663.3536.41
Help /wp-admin/admin.php?page=daextulma-help9892.0124.4026.07
Import /wp-admin/admin.php?page=daextulma-import9712.0525.9828.76

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • 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
Please take a closer look at the following
  • 261× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\CommonMark\\Extension\\FrontMatter\\Data\\FrontMatterDataParserInterface' not found in wp-content/plugins/ultimate-markdown/vendor/league/commonmark/src/Extension/FrontMatter/Data/LibYamlFrontMatterParser.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\CommonMark\\Renderer\odeRendererInterface' not found in wp-content/plugins/ultimate-markdown/vendor/league/commonmark/src/Extension/CommonMark/Renderer/Block/ListItemRenderer.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Config\\ConfigurationProviderInterface' not found in wp-content/plugins/ultimate-markdown/vendor/league/commonmark/src/Environment/EnvironmentInterface.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'League\\CommonMark\\Event\\AbstractEvent' not found in wp-content/plugins/ultimate-markdown/vendor/league/commonmark/src/Event/DocumentPreParsedEvent.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\CommonMark\\Output\\RenderedContentInterface' not found in wp-content/plugins/ultimate-markdown/vendor/league/commonmark/src/Output/RenderedContent.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'League\\CommonMark\ode\\Block\\AbstractBlock' not found in wp-content/plugins/ultimate-markdown/vendor/league/commonmark/src/Extension/CommonMark/Node/Block/IndentedCode.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Mni\\FrontYAML\\Markdown\\MarkdownParser' not found in wp-content/plugins/ultimate-markdown/vendor/mnapoli/front-yaml/src/Bridge/CommonMark/CommonMarkParser.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\CommonMark\\Parser\\Block\\BlockStartParserInterface' not found in wp-content/plugins/ultimate-markdown/vendor/league/commonmark/src/Extension/CommonMark/Parser/Block/FencedCodeStartParser.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\CommonMark\\Parser\\Inline\\InlineParserInterface' not found in wp-content/plugins/ultimate-markdown/vendor/league/commonmark/src/Extension/Attributes/Parser/AttributesInlineParser.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\CommonMark\\Extension\\ConfigurableExtensionInterface' not found in wp-content/plugins/ultimate-markdown/vendor/league/commonmark/src/Extension/DisallowedRawHtml/DisallowedRawHtmlExtension.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

ultimate-markdown/init.php 92% from 13 tests

The main PHP file in "Ultimate Markdown" ver. 1.12 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ultimate-markdown.php" instead of "init.php")

Code Analysis 97% from 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 plugin36,825 lines of code in 510 files:
LanguageFilesBlank linesComment linesLines of code
PHP4026,3579,23719,589
JavaScript923,6962,20914,380
CSS11578702,729
Markdown4380115
XML13312

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity8.17
▷ Minimum class complexity1.00
▷ Maximum class complexity299.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces93
Interfaces62
Traits3
Classes330
▷ Abstract classes72.12%
▷ Concrete classes32397.88%
▷ Final classes23472.45%
Methods1,587
▷ Static methods32920.73%
▷ Public methods1,40888.72%
▷ Protected methods80.50%
▷ Private methods17110.78%
Functions70
▷ Named functions3550.00%
▷ Anonymous functions3550.00%
Constants177
▷ Global constants10.56%
▷ Class constants17699.44%
▷ Public constants14984.66%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.10MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/clone-hover.png18.71KB0.12KB▼ 99.34%
admin/assets/img/select2-multiple-choice-close.png1.87KB0.29KB▼ 84.67%
admin/assets/img/search-hover.png0.21KB0.21KB0.00%
admin/assets/img/arrow-down-f7f7f7.png15.21KB0.15KB▼ 98.99%
admin/assets/img/trash.png1.11KB0.19KB▼ 82.81%