99% use-cmb2-markdown

Code Review | CMB2 Markdown

WordPress plugin CMB2 Markdown scored 99% from 54 tests.

About plugin

  • Plugin page: use-cmb2-markdown
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 5.9.2
  • First release: Nov 16, 2017
  • Latest release: Nov 19, 2017
  • Number of updates: 6
  • Update frequency: every 2.3 days
  • Top authors: ryanpmckenna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 461 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼300.86ms] Passed 4 tests

Analyzing server-side resources used by CMB2 Markdown
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.08 ▲2.29
Dashboard /wp-admin3.42 ▲0.0133.04 ▲0.56
Posts /wp-admin/edit.php3.65 ▲0.0135.61 ▼2.01
Add New Post /wp-admin/post-new.php6.90 ▼0.0890.17 ▼1,203.21
Media Library /wp-admin/upload.php3.30 ▲0.0125.74 ▲1.22

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by CMB2 Markdown
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,787 ▲3316.23 ▲0.535.73 ▼0.122.09 ▼0.32
Dashboard /wp-admin2,896 ▲426.31 ▲0.10123.26 ▼21.03154.51 ▼8.39
Posts /wp-admin/edit.php2,692 ▲13.25 ▲0.0265.18 ▲1.37143.45 ▼0.01
Add New Post /wp-admin/post-new.php1,762 ▲10122.11 ▼0.41466.21 ▲31.59157.44 ▲12.67
Media Library /wp-admin/upload.php1,694 ▼45.61 ▲0.11151.27 ▲2.12187.59 ▲1.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === use-cmb2-markdown === )
You can look at the official readme.txt

use-cmb2-markdown/cmb2-markdown.php 77% from 13 tests

"CMB2 Markdown" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("use-cmb2-markdown.php" instead of "cmb2-markdown.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected265 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS1686232
PHP294532
JavaScript1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin