Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼10.59ms] Passed 4 tests
Server-side resources used by Swaysmart
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 39.03 ▼4.32 |
Dashboard /wp-admin | 3.32 ▼0.02 | 46.02 ▼17.50 |
Posts /wp-admin/edit.php | 3.37 ▲0.02 | 44.28 ▼5.58 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.02 | 83.59 ▼14.95 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 37.22 ▲1.08 |
Swaysmart /wp-admin/options-general.php?page=swaysmart/swaysmart.php | 3.19 | 32.89 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
sway_insert_header |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Swaysmart
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,795 ▲34 | 14.36 ▼0.02 | 1.64 ▲0.09 | 40.20 ▼3.93 |
Dashboard /wp-admin | 2,199 ▲19 | 5.54 ▼0.06 | 85.08 ▼10.43 | 36.78 ▼0.23 |
Posts /wp-admin/edit.php | 2,107 ▲4 | 2.00 ▲0.03 | 37.52 ▼4.17 | 32.55 ▼0.47 |
Add New Post /wp-admin/post-new.php | 6,236 ▲4,710 | 19.01 ▼3.98 | 854.26 ▲264.02 | 89.10 ▲25.44 |
Media Library /wp-admin/upload.php | 1,407 ▲7 | 4.22 ▲0.04 | 101.60 ▼7.93 | 42.19 ▼1.77 |
Swaysmart /wp-admin/options-general.php?page=swaysmart/swaysmart.php | 820 | 1.99 | 25.91 | 29.92 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- The uninstall procedure has failed, leaving 7 options in the database
- theysaidso_admin_options
- widget_recent-comments
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
- sway_insert_header
- can_compress_scripts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=swaysmart/swaysmart.php
- > 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=swaysmart/swaysmart.php
- > User deprecated in wp-includes/functions.php+5463
Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
SRP 0% 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
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/swaysmart/meta.php
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/swaysmart/swaysmart.php:17
- > 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
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: post, head, header, swaysmart, admin...
swaysmart/swaysmart.php Passed 13 tests
"Swaysmart" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
88 characters long description:
This plugin allows you to add swaysmart javascript in the header of your Wordpress site.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin152 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 39 | 17 | 152 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 7.00 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 1.67 |
▷ 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 | 9 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 9 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected