84% import-markdown

Code Review | Import Markdown

WordPress plugin Import Markdown scored84%from 54 tests.

About plugin

  • Plugin page: import-markdown
  • Plugin version: 1.10
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 3, 2018
  • Latest release: May 26, 2023
  • Number of updates: 16
  • Update frequency: every 111.8 days
  • Top authors: daext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /12,209 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.55MB] [CPU: ▼3.58ms] Passed 4 tests

An overview of server-side resources used by Import Markdown
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.25 ▲0.23
Dashboard /wp-admin4.04 ▲0.7447.92 ▼0.91
Posts /wp-admin/edit.php4.15 ▲0.8050.86 ▲1.24
Add New Post /wp-admin/post-new.php6.62 ▲0.7383.65 ▼14.86
Media Library /wp-admin/upload.php3.96 ▲0.7341.24 ▲6.76
Options /wp-admin/admin.php?page=daimma-options3.9334.39
Help /wp-admin/admin.php?page=daimma-help3.9337.48
Pro Version /wp-admin/admin.php?page=daimma-pro-version3.9334.70
Import /wp-admin/admin.php?page=daimma-import3.9339.34

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 61 new files
Database: no new tables, 12 new options
New WordPress options
widget_recent-posts
daimma_markdown_parser
daimma_import_menu_required_capability
widget_recent-comments
daimma_cebe_markdown_enable_new_lines
widget_theysaidso_widget
daimma_import_post_type
daimma_cebe_markdown_keep_list_start_number
daimma_cebe_markdown_html5
db_upgraded
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Import Markdown
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲18814.73 ▲0.741.80 ▲0.1442.46 ▼1.49
Dashboard /wp-admin2,358 ▲1885.65 ▲0.0686.13 ▼17.8137.71 ▼2.99
Posts /wp-admin/edit.php2,260 ▲1602.05 ▲0.0938.23 ▼2.0131.66 ▼1.46
Add New Post /wp-admin/post-new.php1,556 ▲1923.17 ▲4.92594.43 ▼22.3775.61 ▲7.97
Media Library /wp-admin/upload.php1,560 ▲1634.21 ▼0.0297.82 ▼1.0239.17 ▼6.57
Options /wp-admin/admin.php?page=daimma-options1,2102.2546.2838.94
Help /wp-admin/admin.php?page=daimma-help9792.0132.8329.47
Pro Version /wp-admin/admin.php?page=daimma-pro-version1,0502.0024.2028.12
Import /wp-admin/admin.php?page=daimma-import9752.0229.4929.75

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Trait 'cebe\\markdown\\block\\CodeTrait' not found in wp-content/plugins/import-markdown/vendor/cebe/markdown/block/FencedCodeTrait.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'Parsedown' not found in wp-content/plugins/import-markdown/vendor/erusev/parsedown-extra/ParsedownExtra.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/import-markdown/admin/view/help.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'cebe\\markdown\\Markdown' not found in wp-content/plugins/import-markdown/vendor/cebe/markdown/GithubMarkdown.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/import-markdown/admin/view/import.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/import-markdown/admin/view/options.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'cebe\\markdown\\Parser' not found in wp-content/plugins/import-markdown/vendor/cebe/markdown/Markdown.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'cebe\\markdown\\Markdown' not found in wp-content/plugins/import-markdown/vendor/cebe/markdown/MarkdownExtra.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/import-markdown/admin/view/pro_version.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: import, importer, markdown, markdown import, markdown importer

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

The entry point to "Import Markdown" version 1.10 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("import-markdown.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected6,181 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP341,0501,0273,773
JavaScript4109121,159
CSS9148481,090
PO File13611,305140
Markdown14019

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity24.96
▷ Minimum class complexity2.00
▷ Maximum class complexity159.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces4
Interfaces0
Traits13
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods212
▷ Static methods73.30%
▷ Public methods6128.77%
▷ Protected methods14266.98%
▷ Private methods94.25%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/league-table-thumbnail.png1.41KB1.33KB▼ 6.02%
admin/assets/img/help-fdfdfd.png15.52KB0.53KB▼ 96.60%
admin/assets/img/help-f7f7f7.png15.86KB0.59KB▼ 96.25%
admin/assets/inc/chosen/chosen-sprite.png0.53KB0.88KB0.00%
admin/assets/inc/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%