73% wp-githuber-md

Code Review | WP Githuber MD - WordPress Markdown Editor

WordPress plugin WP Githuber MD - WordPress Markdown Editor scored73%from 54 tests.

About plugin

  • Plugin page: wp-githuber-md
  • Plugin version: 1.16.2
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 24, 2018
  • Latest release: May 23, 2023
  • Number of updates: 120
  • Update frequency: every 13.4 days
  • Top authors: terrylin (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

7,000+ active /118,726 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼8.44ms] Passed 4 tests

Server-side resources used by WP Githuber MD - WordPress Markdown Editor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1642.31 ▼3.85
Dashboard /wp-admin4.25 ▲0.9458.37 ▲9.36
Posts /wp-admin/edit.php4.30 ▲0.9451.11 ▼0.78
Add New Post /wp-admin/post-new.php4.48 ▼1.4169.22 ▼32.61
Media Library /wp-admin/upload.php4.15 ▲0.9239.24 ▲3.48
WP Githuber MD /wp-admin/options-general.php?page=githuber-md4.1538.46

Server storage [IO: ▲38.12MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • Try to limit filesystem usage to 25MB (currently using 38.12MB)
Filesystem: 2,784 new files
Database: no new tables, 11 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
githuber_about
githuber_markdown
widget_theysaidso_widget
githuber_extensions
githuber_modules
widget_recent-comments
db_upgraded
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Githuber MD - WordPress Markdown Editor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲21715.77 ▲1.101.78 ▼0.2145.11 ▼2.76
Dashboard /wp-admin2,380 ▲2017.20 ▲1.32137.13 ▲36.9442.34 ▼1.74
Posts /wp-admin/edit.php2,297 ▲2053.68 ▲1.6259.70 ▲18.5332.66 ▼1.34
Add New Post /wp-admin/post-new.php3,254 ▲1,7216.04 ▼16.98138.06 ▼482.15130.26 ▲85.67
Media Library /wp-admin/upload.php1,425 ▲374.89 ▲0.7195.02 ▼2.7444.26 ▲3.39
WP Githuber MD /wp-admin/options-general.php?page=githuber-md3,4804.6187.6588.18

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • githuber_extensions
    • widget_recent-comments
    • githuber_markdown
    • githuber_modules
    • widget_recent-posts
    • db_upgraded
    • githuber_about
    • theysaidso_admin_options
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 50× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Githuber\\Module\\ModuleAbstract' not found in wp-content/plugins/wp-githuber-md/src/Modules/Mermaid.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/wp-githuber-md/vendor/league/html-to-markdown/src/Converter/ParagraphConverter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\HtmlConverterInterface' not found in wp-content/plugins/wp-githuber-md/vendor/league/html-to-markdown/src/HtmlConverter.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Githuber\\Module\\ModuleAbstract' not found in wp-content/plugins/wp-githuber-md/src/Modules/Highlight.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/wp-githuber-md/vendor/league/html-to-markdown/src/Converter/HeaderConverter.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Githuber\\Module\\ModuleAbstract' not found in wp-content/plugins/wp-githuber-md/src/Modules/Prism.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/wp-githuber-md/vendor/league/html-to-markdown/src/Converter/HardBreakConverter.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Githuber\\Controller\\ControllerAbstract' not found in wp-content/plugins/wp-githuber-md/src/Controllers/HtmlToMarkdown.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\HTMLToMarkdown\\Converter\\ConverterInterface' not found in wp-content/plugins/wp-githuber-md/vendor/league/html-to-markdown/src/Converter/ListItemConverter.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ParsedownTest' not found in wp-content/plugins/wp-githuber-md/vendor/erusev/parsedown-extra/test/ParsedownExtraTest.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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: You can look at the official readme.txt

wp-githuber-md/githuber-md.php 92% from 13 tests

The main file in "WP Githuber MD - WordPress Markdown Editor" v. 1.16.2 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: Name the main plugin file the same as the plugin slug ("wp-githuber-md.php" instead of "githuber-md.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-githuber-md/vendor/bin/html-to-markdown.bat
101,673 lines of code in 1,800 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1,4179,47715,56067,960
CSS2181,4876169,878
PHP1042,1993,5468,868
Sass20572465,657
JSON8603,919
Markdown1453603,268
PO File23744881,051
SVG200576
HTML9390451
Ruby2143018
YAML1209
XML1008
Bourne Shell1316
DOS Batch1004

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.16
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces6
Interfaces4
Traits0
Classes58
▷ Abstract classes35.17%
▷ Concrete classes5594.83%
▷ Final classes11.82%
Methods463
▷ Static methods163.46%
▷ Public methods36278.19%
▷ Protected methods8418.14%
▷ Private methods173.67%
Functions26
▷ Named functions1765.38%
▷ Anonymous functions934.62%
Constants32
▷ Global constants825.00%
▷ Class constants2475.00%
▷ Public constants24100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
888 PNG files occupy 4.11MB with 1.53MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/vendor/emojify/images/pear.png6.77KB3.50KB▼ 48.28%
assets/vendor/emojify/images/radio_button.png2.15KB2.64KB0.00%
assets/vendor/emojify/images/bank.png5.45KB2.84KB▼ 47.98%
assets/vendor/emojify/images/dromedary_camel.png5.02KB2.64KB▼ 47.38%
assets/vendor/emojify/images/tomato.png5.61KB3.21KB▼ 42.90%