Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.05MB] [CPU: ▼2.01ms] Passed 4 tests
Server-side resources used by Prettify Code Syntax
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 45.57 ▲1.01 |
Dashboard /wp-admin | 3.35 ▲0.05 | 49.39 ▼1.65 |
Posts /wp-admin/edit.php | 3.40 ▲0.05 | 50.88 ▲0.95 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.07 | 89.39 ▼3.21 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 38.12 ▼4.14 |
Prettify Code Syntax /wp-admin/options-general.php?page=prettify-code-syntax | 3.24 | 29.46 |
Server storage [IO: ▲0.26MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Prettify Code Syntax
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,801 ▲40 | 13.52 ▼1.01 | 9.32 ▲7.71 | 39.06 ▼8.62 |
Dashboard /wp-admin | 2,198 ▲18 | 5.61 ▼0.01 | 90.60 ▼3.06 | 40.85 ▼0.41 |
Posts /wp-admin/edit.php | 2,106 ▲9 | 2.00 ▲0.04 | 39.36 ▲0.78 | 34.70 ▼0.82 |
Add New Post /wp-admin/post-new.php | 1,530 ▲4 | 23.09 ▼0.05 | 644.21 ▼58.47 | 69.27 ▼2.23 |
Media Library /wp-admin/upload.php | 1,403 ▲3 | 4.22 ▲0.11 | 103.88 ▼12.69 | 46.90 ▼0.04 |
Prettify Code Syntax /wp-admin/options-general.php?page=prettify-code-syntax | 1,202 | 2.18 | 27.44 | 30.92 |
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
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
- > GET request to /wp-admin/options-general.php?page=prettify-code-syntax
- > User deprecated in wp-includes/functions.php+5463
Function screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/options-general.php?page=prettify-code-syntax
- > User deprecated in wp-includes/functions.php+5463
Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
- 31 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=prettify-code-syntax
- > Notice in wp-content/plugins/prettify-code-syntax/views/style-style-field-content.php+26
Trying to access array offset on value of type bool
- 5 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=prettify-code-syntax
- > Notice in wp-content/plugins/prettify-code-syntax/views/style-style-field-content.php+9
Undefined variable: options
- 5 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=prettify-code-syntax
- > Notice in wp-content/plugins/prettify-code-syntax/views/style-style-field-content.php+9
Trying to access array offset on value of type null
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
Please fix the following items
- 6× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/prettify-code-syntax/views/languages-extra-languages-field-content.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/prettify-code-syntax/views/languages-section-description.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/prettify-code-syntax/views/style-style-field-content.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/prettify-code-syntax/views/style-section-description.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/prettify-code-syntax/views/options.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/prettify-code-syntax/prettify-code-syntax.php:33
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: syntax, markup, highlighter, prettify, code
prettify-code-syntax/prettify-code-syntax.php Passed 13 tests
The main PHP file in "Prettify Code Syntax" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
104 characters long description:
Code syntax highlighter using Google Prettify, supporting the HTML5 recommendation, and caching plugins.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,047 lines of code in 43 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 29 | 223 | 1,445 | 1,459 |
CSS | 6 | 39 | 18 | 321 |
PHP | 7 | 73 | 23 | 228 |
PO File | 1 | 12 | 17 | 39 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.18 |
Average class complexity | 7.00 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 1.38 |
▷ Minimum method complexity | 1.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 | 16 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 16 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.09MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/bootstrap.png | 31.43KB | 5.50KB | ▼ 82.51% |
images/default.png | 13.19KB | 13.13KB | 0.45% |
images/sunburst.png | 12.38KB | 12.24KB | ▼ 1.13% |
images/desert.png | 13.73KB | 12.92KB | ▼ 5.92% |
images/sons-of-obsidian.png | 17.99KB | 17.08KB | ▼ 5.03% |