94% markdown-importer

Code Review | Markdown Importer

WordPress plugin Markdown Importer scored 94% from 54 tests.

About plugin

  • Plugin page: markdown-importer
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-4.7.0
  • WordPress version: 5.9.2
  • First release: Aug 1, 2016
  • Latest release: Jan 7, 2017
  • Number of updates: 9
  • Update frequency: every 18.9 days
  • Top authors: inc2734 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,781 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Markdown Importer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1354.24 ▲4.87
Dashboard /wp-admin3.48 ▲0.0733.46 ▼0.90
Posts /wp-admin/edit.php3.71 ▲0.0639.78 ▲2.68
Add New Post /wp-admin/post-new.php6.94 ▼0.0397.41 ▼1,170.56
Media Library /wp-admin/upload.php3.36 ▲0.0624.36 ▼0.50
Markdown Importer /wp-admin/tools.php?page=Markdown_Importer_Admin_Controller3.3322.61

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Markdown Importer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,789 ▲3416.24 ▲0.466.00 ▼1.962.10 ▼0.32
Dashboard /wp-admin2,897 ▲366.11 ▼0.06118.54 ▼20.32155.84 ▼6.45
Posts /wp-admin/edit.php2,693 ▼13.23 ▼0.0163.16 ▼2.36144.92 ▲0.70
Add New Post /wp-admin/post-new.php1,664 ▼4716.34 ▼4.38392.05 ▼66.60148.47 ▼12.80
Media Library /wp-admin/upload.php1,703 ▲55.51 ▼0.03136.00 ▼12.33179.38 ▼6.07
Markdown Importer /wp-admin/tools.php?page=Markdown_Importer_Admin_Controller9832.4152.6896.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/markdown-importer/markdown-importer.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
3 plugin tags: importer, plugin, markdown

markdown-importer/markdown-importer.php 92% from 13 tests

The main PHP file in "Markdown Importer" ver. 0.2.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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 plugin353 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP580234347
JSON1006

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.80
▷ Minimum class complexity2.00
▷ Maximum class complexity30.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods25
▷ Static methods14.00%
▷ Public methods1352.00%
▷ Protected methods1248.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected