Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
- The plugin did not install without errors
- > Warning in wp-content/plugins/post-switch/post-switch.php+10
Use of undefined constant POSTSWITCH_PLUGIN - assumed 'POSTSWITCH_PLUGIN' (this will throw an Error in a future version of PHP)
Server metrics [RAM: ▼1.91MB] [CPU: ▼61.70ms] Passed 4 tests
A check of server-side resources used by Post Switch
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.09 ▼1.38 | 4.88 ▼39.55 |
Dashboard /wp-admin | 2.11 ▼1.24 | 6.45 ▼60.84 |
Posts /wp-admin/edit.php | 2.11 ▼1.25 | 6.66 ▼44.33 |
Add New Post /wp-admin/post-new.php | 2.11 ▼3.78 | 6.66 ▼102.07 |
Media Library /wp-admin/upload.php | 2.11 ▼1.12 | 6.17 ▼31.92 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
Browser metrics Passed 4 tests
A check of browser resources used by Post Switch
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.69 ▲0.34 | 1.73 ▼0.25 | 42.79 ▲0.61 |
Dashboard /wp-admin | 2,195 ▲15 | 5.61 ▼0.04 | 91.40 ▼4.98 | 41.28 ▼0.09 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 2.04 ▲0.05 | 39.02 ▼1.45 | 37.20 ▲2.64 |
Add New Post /wp-admin/post-new.php | 6,256 ▲4,709 | 26.22 ▲7.83 | 930.39 ▲245.90 | 66.14 ▼15.36 |
Media Library /wp-admin/upload.php | 1,394 ▼3 | 4.21 ▲0.00 | 100.20 ▲0.58 | 42.97 ▲1.58 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- The plugin did not uninstall gracefully
- > Warning in wp-content/plugins/post-switch/post-switch.php+10
Use of undefined constant POSTSWITCH_PLUGIN - assumed 'POSTSWITCH_PLUGIN' (this will throw an Error in a future version of PHP)
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
- 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Warning
Use of undefined constant POSTSWITCH_VERSION - assumed 'POSTSWITCH_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-switch/post-switch.php on line 11
- > PHP Warning
Use of undefined constant POSTSWITCH_PLUGIN - assumed 'POSTSWITCH_PLUGIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-switch/post-switch.php on line 10
- > PHP Fatal error
Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/post-switch/post-switch.php:12
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
- Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line (
=== post-switch ===
)
post-switch/post-switch.php Passed 13 tests
"Post Switch" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
24 characters long description:
Quickly switch edit post
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected177 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 25 | 19 | 132 |
JavaScript | 1 | 0 | 3 | 45 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 9 | |
▷ Named functions | 9 | 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
Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin