Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.21MB] [CPU: ▼0.51ms] Passed 4 tests
An overview of server-side resources used by Preserve Code Formatting
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.67 ▲0.21 | 37.43 ▼3.72 |
Dashboard /wp-admin | 3.52 ▲0.21 | 46.88 ▼1.61 |
Posts /wp-admin/edit.php | 3.63 ▲0.27 | 47.65 ▲2.97 |
Add New Post /wp-admin/post-new.php | 6.10 ▲0.21 | 95.72 ▲11.29 |
Media Library /wp-admin/upload.php | 3.44 ▲0.21 | 37.10 ▲0.31 |
Code Formatting /wp-admin/options-general.php?page=preserve-code-formatting/preserve-code-formatting.php | 3.43 | 33.50 |
Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
Browser metrics Passed 4 tests
Preserve Code Formatting: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲69 | 13.19 ▼1.19 | 4.63 ▲2.48 | 41.34 ▼5.67 |
Dashboard /wp-admin | 2,207 ▲19 | 5.88 ▲0.02 | 109.64 ▼7.28 | 40.72 ▼2.33 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 1.99 ▲0.02 | 39.38 ▲5.53 | 34.21 ▼2.76 |
Add New Post /wp-admin/post-new.php | 1,537 ▲4 | 23.47 ▲0.03 | 577.23 ▼89.82 | 52.69 ▼10.70 |
Media Library /wp-admin/upload.php | 1,395 ▲10 | 4.27 ▲0.10 | 92.43 ▼7.36 | 41.53 ▼4.44 |
Code Formatting /wp-admin/options-general.php?page=preserve-code-formatting/preserve-code-formatting.php | 932 | 1.68 | 31.24 | 44.71 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/preserve-code-formatting/tests/bootstrap.php
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/preserve-code-formatting/tests/bootstrap.php on line 17
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/preserve-code-formatting/tests/bootstrap.php on line 17
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: coffee2code, code, escape, formatting, writing...
preserve-code-formatting/preserve-code-formatting.php Passed 13 tests
The entry point to "Preserve Code Formatting" version 4.0.1 is a PHP file that has certain tags in its header comment area
134 characters long description:
Preserve formatting of code for display by preventing its modification by WordPress and other plugins while also retaining whitespace.
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
Good job! No executable or dangerous file extensions detected1,517 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 282 | 584 | 1,173 |
Markdown | 3 | 58 | 0 | 309 |
Bourne Shell | 1 | 6 | 2 | 21 |
XML | 1 | 0 | 0 | 14 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 44.50 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 140.00 |
Average method complexity | 2.71 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 38.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 1 | 25.00% |
▷ Concrete classes | 3 | 75.00% |
▷ Final classes | 1 | 33.33% |
Methods | 104 | |
▷ Static methods | 10 | 9.62% |
▷ Public methods | 90 | 86.54% |
▷ Protected methods | 12 | 11.54% |
▷ Private methods | 2 | 1.92% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.00% |
Constants | 1 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 1 | 100.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
c2c_minilogo.png | 3.49KB | 1.91KB | ▼ 45.43% |