84% wpmarkdownimporter

Code Review | WPMarkdownImporter

WordPress plugin WPMarkdownImporter scored84%from 54 tests.

About plugin

  • Plugin page: wpmarkdownimporter
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 14, 2015
  • Latest release: Nov 14, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: larjen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /526 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.19MB] [CPU: ▼8.60ms] Passed 4 tests

An overview of server-side resources used by WPMarkdownImporter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1844.85 ▲3.90
Dashboard /wp-admin3.51 ▲0.1750.49 ▼14.47
Posts /wp-admin/edit.php3.62 ▲0.2750.56 ▲0.51
Add New Post /wp-admin/post-new.php6.09 ▲0.2186.43 ▼18.81
Media Library /wp-admin/upload.php3.43 ▲0.2135.33 ▼1.62
WPMarkdown Importer /wp-admin/tools.php?page=WPMarkdownImporterAdmin3.4137.64

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
WPMarkdownImporter_MESSAGES
db_upgraded
can_compress_scripts
theysaidso_admin_options
WPMarkdownImporter_URLS_TO_PROCESS
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPMarkdownImporter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.30 ▼1.084.75 ▲2.8240.92 ▼1.88
Dashboard /wp-admin2,210 ▲225.85 ▲0.94108.03 ▲0.5939.52 ▼5.45
Posts /wp-admin/edit.php2,093 ▲72.03 ▼0.0137.39 ▲0.8031.08 ▼7.00
Add New Post /wp-admin/post-new.php1,536 ▲623.33 ▲4.83617.69 ▲6.9761.65 ▲6.58
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0597.36 ▼5.6445.31 ▲1.71
WPMarkdown Importer /wp-admin/tools.php?page=WPMarkdownImporterAdmin8862.1925.8432.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpmarkdownimporter/includes/main.php:418
    • > PHP Fatal error
      Uncaught Error: Class 'WPMarkdownImporter' not found in wp-content/plugins/wpmarkdownimporter/includes/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpmarkdownimporter/includes/main.php:418

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: twitter

wpmarkdownimporter/WPMarkdownImporter.php 92% from 13 tests

The main file in "WPMarkdownImporter" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpmarkdownimporter.php" instead of "WPMarkdownImporter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,526 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP55172381,430
Markdown230056
JSON10018
YAML12014
XML1008

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity51.75
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods65
▷ Static methods2233.85%
▷ Public methods2843.08%
▷ Protected methods3655.38%
▷ Private methods11.54%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin