Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼0.99ms] Passed 4 tests
An overview of server-side resources used by Swiftype Custom Posts
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 45.08 ▲7.97 |
Dashboard /wp-admin | 3.31 ▲0.01 | 45.89 ▲1.43 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 46.82 ▼1.40 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 89.45 ▼6.26 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 34.22 ▲2.26 |
Swiftype Custom /wp-admin/options-general.php?page=swiftype-custom-posts | 3.20 | 28.99 |
Server storage [IO: ▲0.22MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 16 new files
Database: 2 new tables, 7 new options
New tables |
---|
wp_swifposts_custom_fields |
wp_swifposts |
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
db_upgraded |
swifpost_db_version |
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by Swiftype Custom Posts
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,829 ▲72 | 13.12 ▼1.41 | 4.86 ▲2.42 | 38.75 ▼3.58 |
Dashboard /wp-admin | 2,210 ▲18 | 5.85 ▲0.71 | 112.46 ▲7.39 | 42.81 ▼3.19 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.03 ▲0.05 | 39.63 ▼5.36 | 37.42 ▼1.11 |
Add New Post /wp-admin/post-new.php | 1,550 ▲13 | 18.86 ▲0.55 | 613.18 ▲4.14 | 70.37 ▲14.67 |
Media Library /wp-admin/upload.php | 1,395 ▲7 | 4.23 ▲0.08 | 94.04 ▼5.81 | 41.70 ▼1.13 |
Swiftype Custom /wp-admin/options-general.php?page=swiftype-custom-posts | 752 | 2.05 | 23.94 | 24.14 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- Zombie tables detected upon uninstall: 2 tables
- wp_swifposts
- wp_swifposts_custom_fields
- Zombie WordPress options detected upon uninstall: 7 options
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- swifpost_db_version
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
- 5× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/swiftype-custom-posts/swifposts-config.php
- > /wp-content/plugins/swiftype-custom-posts/swifposts-install.php
- > /wp-content/plugins/swiftype-custom-posts/swifposts.php
- > /wp-content/plugins/swiftype-custom-posts/templates/ads.php
- > /wp-content/plugins/swiftype-custom-posts/swifposts-loader.php
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Class 'Swifposts_Config' not found in wp-content/plugins/swiftype-custom-posts/templates/credit.php:2
- > PHP Notice
Undefined index: id in wp-content/plugins/swiftype-custom-posts/templates/edit.php on line 4
- > PHP Fatal error
Uncaught Error: Class 'Swifposts_Loader' not found in wp-content/plugins/swiftype-custom-posts/templates/lists.php:4
- > PHP Fatal error
Uncaught Error: Class 'Swifposts_Loader' not found in wp-content/plugins/swiftype-custom-posts/templates/edit.php:6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: custom search, better search, typeahead, suggest, autocomplete...
swiftype-custom-posts/swifposts.php 85% from 13 tests
The principal PHP file in "Swiftype Custom Posts" v. 0.3 is loaded by WordPress automatically on each request
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("swiftype-custom-posts.php" instead of "swifposts.php")
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 158 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin706 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 169 | 27 | 672 |
Sass | 1 | 2 | 0 | 18 |
CSS | 1 | 1 | 1 | 15 |
HTML | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 30.67 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 87.00 |
Average method complexity | 4.18 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 34.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 28 | |
▷ Static methods | 12 | 42.86% |
▷ Public methods | 28 | 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 | 9 | |
▷ Global constants | 3 | 33.33% |
▷ Class constants | 6 | 66.67% |
▷ Public constants | 6 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin