Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.03MB] [CPU: ▼143.59ms] Passed 4 tests
Server-side resources used by CodeMirror for Post Editor
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.86 ▲0.14 | 39.06 ▲14.06 |
Dashboard /wp-admin | 3.08 ▲0.03 | 45.20 ▲2.32 |
Posts /wp-admin/edit.php | 3.17 ▲0.06 | 48.84 ▼5.01 |
Add New Post /wp-admin/post-new.php | 5.45 ▲0.02 | 88.15 ▼568.92 |
Media Library /wp-admin/upload.php | 3.03 ▲0.02 | 38.06 ▼2.73 |
Server storage [IO: ▲2.49MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 358 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
CodeMirror for Post Editor: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,703 ▲56 | 15.86 ▲0.39 | 11.97 ▲5.07 | 43.78 ▼11.75 |
Dashboard /wp-admin | 2,972 ▲38 | 5.89 ▼0.10 | 151.45 ▼8.07 | 116.43 ▼12.22 |
Posts /wp-admin/edit.php | 2,736 ▼3 | 2.70 ▲0.00 | 72.96 ▼2.01 | 92.38 ▲1.57 |
Add New Post /wp-admin/post-new.php | 1,622 ▼61 | 18.96 ▲0.21 | 396.38 ▲7.68 | 111.75 ▼9.62 |
Media Library /wp-admin/upload.php | 1,807 ▼3 | 5.02 ▲0.03 | 159.23 ▲8.39 | 123.12 ▲1.11 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables
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
Everything seems fine, however this is by no means 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
The following issues need your attention
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/codemirror-for-post-editor/codemirror-editor.php:17
- > PHP Fatal error
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 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: writing, html, editor, post, code
codemirror-for-post-editor/codemirror-editor.php 92% from 13 tests
The main PHP file in "CodeMirror for Post Editor" ver. 0.4.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("codemirror-for-post-editor.php" instead of "codemirror-editor.php")
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Please fix the following items
- For security reasons, never distribute binary or executable files with your plugin
- .ls - LightWave LScript File in LightWave
- ☣ wp-content/plugins/codemirror-for-post-editor/js/mode/livescript/livescript.ls
- .ls - LightWave LScript File in LightWave
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 161 | 3,807 | 2,813 | 36,517 |
HTML | 133 | 2,756 | 10 | 17,154 |
CSS | 41 | 267 | 142 | 1,523 |
SVG | 2 | 2 | 2 | 296 |
PHP | 1 | 1 | 13 | 68 |
Bourne Shell | 1 | 0 | 1 | 5 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.11 |
Average class complexity | 5.00 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 5.00 |
Average method complexity | 1.40 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 2.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 10 | |
▷ Static methods | 1 | 10.00% |
▷ Public methods | 8 | 80.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 20.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 2 | 100.00% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
js/img/editor.png | 0.71KB | 0.76KB | 0.00% |
js/doc/logo.png | 11.72KB | 4.95KB | ▼ 57.76% |
js/doc/baboon.png | 22.75KB | 10.31KB | ▼ 54.68% |