84% md-block

Code Review | MD Block

WordPress plugin MD Block scored84%from 54 tests.

About plugin

  • Plugin page: md-block
  • Plugin version: 0.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.0
  • WordPress version: 6.3.1
  • First release: Aug 27, 2022
  • Latest release: Aug 27, 2022
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: mehedimi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /280 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by MD Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.31 ▼0.44
Dashboard /wp-admin3.31 ▲0.0144.71 ▼4.71
Posts /wp-admin/edit.php3.36 ▲0.0147.67 ▼2.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.67 ▼0.94
Media Library /wp-admin/upload.php3.23 ▲0.0133.79 ▼1.72

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 115 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for MD Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6814.48 ▼0.141.67 ▲0.0740.92 ▼0.76
Dashboard /wp-admin2,209 ▲184.85 ▼1.0398.70 ▼2.4340.51 ▼0.95
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0439.45 ▼1.7233.60 ▼4.85
Add New Post /wp-admin/post-new.php6,262 ▲4,72020.54 ▲2.30934.02 ▲321.0859.40 ▲8.88
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.0195.81 ▼5.3340.44 ▼3.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

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 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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/md-block/md-block.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: editor, block, markdown, writing

md-block/md-block.php Passed 13 tests

The main file in "MD Block" v. 0.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
A Gutenberg Block that allow to write markdown in Block Editor

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
There were no executable files found in this plugin1,385 lines of code in 114 files:
LanguageFilesBlank linesComment linesLines of code
PHP43811351,253
JavaScript10700107
JSON10023
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity94.00
▷ Minimum class complexity2.00
▷ Maximum class complexity186.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods53
▷ Static methods47.55%
▷ Public methods916.98%
▷ Protected methods4483.02%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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