10% markdown-for-p2

Code Review | Markdown for P2

WordPress plugin Markdown for P2 scored 10% from 54 tests.

About plugin

  • Plugin page: markdown-for-p2
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.1
  • WordPress version: 5.9.2
  • First release: Jul 6, 2012
  • Latest release: Jul 6, 2012
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: ryanimel (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,428 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/markdown-for-p2/markdown-extra.php+925
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼2.08MB] [CPU: ▼346.35ms] Passed 4 tests

Analyzing server-side resources used by Markdown for P2
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.224.99 ▼48.78
Dashboard /wp-admin2.31 ▼1.104.96 ▼28.98
Posts /wp-admin/edit.php2.31 ▼1.335.29 ▼32.25
Add New Post /wp-admin/post-new.php2.31 ▼4.665.12 ▼1,275.39
Media Library /wp-admin/upload.php2.31 ▼0.984.32 ▼20.85

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Markdown for P2
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.90 ▼0.096.43 ▲0.392.51 ▲0.30
Dashboard /wp-admin2,895 ▲345.96 ▼0.35117.18 ▼18.87157.06 ▼8.38
Posts /wp-admin/edit.php2,688 ▼33.24 ▼0.0064.92 ▲0.44137.99 ▼6.67
Add New Post /wp-admin/post-new.php1,661 ▼016.53 ▼0.07410.31 ▼28.78160.08 ▼0.21
Media Library /wp-admin/upload.php1,689 ▼95.47 ▲0.00142.11 ▲5.47189.89 ▼3.90

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/markdown-for-p2/markdown-extra.php+925
    Array and string offset access syntax with curly braces is deprecated

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× 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/markdown-for-p2/markdown-for-p2.php:45

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 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
4 plugin tags: formatting, markdown, comments, p2

markdown-for-p2/markdown-for-p2.php Passed 13 tests

Analyzing the main PHP file in "Markdown for P2" version 0.1.1
97 characters long description:
Markdown for P2 will enable Markdown formatting within your P2 theme status updates and comments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,755 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24237971,755

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity46.33
▷ Minimum class complexity4.00
▷ Maximum class complexity73.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods87
▷ Static methods00.00%
▷ Public methods87100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin