Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.02MB] [CPU: ▲0.98ms] Passed 4 tests
Analyzing server-side resources used by Pygment It
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.03 | 38.50 ▲0.34 |
Dashboard /wp-admin | 3.34 ▼0.00 | 54.38 ▼1.66 |
Posts /wp-admin/edit.php | 3.39 ▲0.03 | 47.17 ▲2.64 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.04 | 93.62 ▲2.60 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 36.54 ▲3.99 |
Pygment It /wp-admin/options-general.php?page=TpN6aJc5tLk40rVxIA5DCNg3434RQXL1 | 3.23 | 28.86 |
Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
Pygment It: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,795 ▲49 | 14.27 ▼0.29 | 1.87 ▲0.34 | 48.03 ▲8.85 |
Dashboard /wp-admin | 2,202 ▲21 | 5.62 ▼0.07 | 83.79 ▼18.42 | 40.27 ▲0.00 |
Posts /wp-admin/edit.php | 2,104 ▲7 | 1.99 ▲0.06 | 40.29 ▲5.03 | 36.26 ▲2.68 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.13 ▼0.55 | 659.43 ▲12.15 | 53.26 ▼12.14 |
Media Library /wp-admin/upload.php | 1,398 ▼2 | 4.22 ▲0.01 | 102.00 ▲5.55 | 47.73 ▲0.32 |
Pygment It /wp-admin/options-general.php?page=TpN6aJc5tLk40rVxIA5DCNg3434RQXL1 | 926 | 2.00 | 24.11 | 25.21 |
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
The following items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
Almost there! Just fix the following items
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/pygment-it/webservice.php
- > /wp-content/plugins/pygment-it/test.php
- 23× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Warning
Use of undefined constant PYGMENT_INS - assumed 'PYGMENT_INS' (this will throw an Error in a future version of PHP) in wp-content/plugins/pygment-it/config.php on line 46
- > PHP Notice
Undefined index: lang in wp-content/plugins/pygment-it/webservice.php on line 10
- > PHP Warning
Use of undefined constant PYGMENT_INS - assumed 'PYGMENT_INS' (this will throw an Error in a future version of PHP) in wp-content/plugins/pygment-it/config.php on line 46
- > PHP Warning
Use of undefined constant PYGMENT_INS - assumed 'PYGMENT_INS' (this will throw an Error in a future version of PHP) in wp-content/plugins/pygment-it/config.php on line 27
- > PHP Notice
Undefined index: code in wp-content/plugins/pygment-it/webservice.php on line 9
- > PHP Warning
Use of undefined constant PYGMENT_INS - assumed 'PYGMENT_INS' (this will throw an Error in a future version of PHP) in wp-content/plugins/pygment-it/config.php on line 27
- > PHP Notice
Undefined index: hl_lines in wp-content/plugins/pygment-it/webservice.php on line 14
- > PHP Warning
Use of undefined constant PYGMENT_INS - assumed 'PYGMENT_INS' (this will throw an Error in a future version of PHP) in wp-content/plugins/pygment-it/config.php on line 46
- > PHP Notice
Undefined index: linenostart in wp-content/plugins/pygment-it/webservice.php on line 12
- > PHP Warning
Use of undefined constant PYGMENT_INS - assumed 'PYGMENT_INS' (this will throw an Error in a future version of PHP) in wp-content/plugins/pygment-it/config.php on line 46
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: highlighting, highlighter, syntax, pygment
pygment-it/pygment-it.php Passed 13 tests
"Pygment It" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
80 characters long description:
Syntax highlighting with Pygments. Usage: [code language="ruby"]code here[/code]
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,190 lines of code in 22 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 13 | 0 | 0 | 894 |
PHP | 7 | 51 | 31 | 231 |
Markdown | 2 | 27 | 0 | 65 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.15 |
Average class complexity | 3.00 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 3.00 |
Average method complexity | 3.00 |
▷ Minimum method complexity | 3.00 |
▷ Maximum method complexity | 3.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 | 1 | |
▷ Static methods | 1 | 100.00% |
▷ Public methods | 1 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 7 | |
▷ Named functions | 7 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 32 | |
▷ Global constants | 32 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/screen.png | 18.55KB | 7.69KB | ▼ 58.54% |