Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
- Install procedure had errors
- > Deprecated in wp-content/plugins/safe-php-code-widget/safe-php-code-widget.php+62
Function create_function() is deprecated
Server metrics [RAM: ▼1.96MB] [CPU: ▼54.34ms] Passed 4 tests
This is a short check of server-side resources used by Safe PHP Code Widget
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.03 ▼1.44 | 4.37 ▼38.17 |
Dashboard /wp-admin | 2.05 ▼1.26 | 6.16 ▼43.82 |
Posts /wp-admin/edit.php | 2.05 ▼1.31 | 5.05 ▼46.91 |
Add New Post /wp-admin/post-new.php | 2.05 ▼3.84 | 5.75 ▼88.47 |
Media Library /wp-admin/upload.php | 2.05 ▼1.18 | 4.26 ▼29.19 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
widget_safephpcode |
Browser metrics Passed 4 tests
Checking browser requirements for Safe PHP Code Widget
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.34 ▼0.01 | 1.70 ▲0.12 | 41.77 ▲1.96 |
Dashboard /wp-admin | 2,198 ▲21 | 5.57 ▲0.00 | 90.11 ▲1.34 | 41.08 ▲0.87 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 2.02 ▲0.07 | 39.63 ▼2.07 | 37.46 ▲0.11 |
Add New Post /wp-admin/post-new.php | 1,526 ▼2 | 23.00 ▼0.11 | 660.11 ▼2.00 | 63.65 ▲8.55 |
Media Library /wp-admin/upload.php | 1,397 ▼3 | 4.17 ▼0.01 | 106.76 ▲5.53 | 45.48 ▼0.92 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- This plugin did not uninstall without warnings or errors
- > Deprecated in wp-content/plugins/safe-php-code-widget/safe-php-code-widget.php+62
Function create_function() is deprecated
- This plugin does not fully uninstall, leaving 7 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- widget_safephpcode
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
The following issues need your attention
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/safe-php-code-widget/safe-php-code-widget.php:12
- > 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)
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 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
Please fix the following attributes:
- Screenshots: These screenshots require images: #1 (The widgets screen showing a Safe PHP Code Widget in use.), #2 (The output of the widget on the site.)
safe-php-code-widget/safe-php-code-widget.php 92% from 13 tests
The entry point to "Safe PHP Code Widget" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin46 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 7 | 9 | 46 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.13 |
Average class complexity | 6.00 |
▷ Minimum class complexity | 6.00 |
▷ Maximum class complexity | 6.00 |
Average method complexity | 2.25 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.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 | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 4.45KB | 2.58KB | ▼ 42.07% |
screenshot-1.png | 15.84KB | 6.86KB | ▼ 56.67% |