93% parsedown-importer

Code Review | Parsedown Importer

WordPress plugin Parsedown Importer scored 93% from 54 tests.

About plugin

  • Plugin page: parsedown-importer
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.8
  • WordPress version: 5.8.1
  • First release: Mar 15, 2017
  • Latest release: Sep 12, 2017
  • Number of updates: 9
  • Update frequency: every 19.7 days
  • Top authors: foresthoffman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 664 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼140.46ms] Passed 4 tests

This is a short check of server-side resources used by Parsedown Importer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.03 ▲0.3040.27 ▲8.68
Dashboard /wp-admin3.31 ▲0.2542.44 ▼4.56
Posts /wp-admin/edit.php3.36 ▲0.2449.30 ▲8.50
Add New Post /wp-admin/post-new.php5.61 ▲0.1790.45 ▼566.70
Media Library /wp-admin/upload.php3.19 ▲0.1835.27 ▲0.93
Parsedown Import /wp-admin/tools.php?page=pdi-page3.1634.46

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 134 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Parsedown Importer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲11215.86 ▲0.328.60 ▼0.8248.33 ▲0.98
Dashboard /wp-admin2,969 ▲355.94 ▲0.04157.67 ▲8.85114.44 ▼14.18
Posts /wp-admin/edit.php2,744 ▲82.68 ▼0.0269.00 ▲4.2190.61 ▼12.82
Add New Post /wp-admin/post-new.php1,686 ▲10518.84 ▲2.35381.48 ▼56.55122.00 ▼33.27
Media Library /wp-admin/upload.php1,812 ▲55.01 ▼0.03160.66 ▼11.84127.90 ▼21.46
Parsedown Import /wp-admin/tools.php?page=pdi-page1,1742.3261.4082.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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 fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/parsedown-importer/pdi.php:34
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/parsedown-importer/tests/bootstrap.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/parsedown-importer/tests/test-sample.php:11
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/parsedown-importer/tests/bootstrap.php on line 14

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 Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: posts, admin, pages, importer

parsedown-importer/pdi.php 77% from 13 tests

Analyzing the main PHP file in "Parsedown Importer" version 1.0.8
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")
  • 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
  • Main file name: The principal plugin file should be the same as the plugin slug ("parsedown-importer.php" instead of "pdi.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin21,791 lines of code in 116 files:
LanguageFilesBlank linesComment linesLines of code
CSS513277,344
LESS711,1751,5425,590
JavaScript231,2916574,056
JSON4002,890
PHP53931851,341
SVG100288
Bourne Shell121799
Markdown253094
YAML1111655
XML22022
Bourne Again Shell15012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity47.00
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods54
▷ Static methods11.85%
▷ Public methods1527.78%
▷ Protected methods3870.37%
▷ Private methods11.85%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin