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
- > Deprecated in wp-content/plugins/typeahead/typeahead.php+42
__autoload() is deprecated, use spl_autoload_register() instead
Server metrics [RAM: ▼1.94MB] [CPU: ▼59.16ms] Passed 4 tests
Server-side resources used by Typeahead
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.06 ▼1.40 | 4.44 ▼36.81 |
Dashboard /wp-admin | 2.08 ▼1.27 | 6.72 ▼55.45 |
Posts /wp-admin/edit.php | 2.08 ▼1.28 | 5.23 ▼51.05 |
Add New Post /wp-admin/post-new.php | 2.08 ▼3.81 | 6.04 ▼93.34 |
Media Library /wp-admin/upload.php | 2.08 ▼1.15 | 4.88 ▼30.70 |
Typeahead Settings /wp-admin/options-general.php?page=typeahead | 2.08 | 5.40 |
Server storage [IO: ▲0.96MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
typeahead |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
A check of browser resources used by Typeahead
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,030 ▲295 | 13.78 ▼0.59 | 19.32 ▲17.23 | 42.32 ▼8.32 |
Dashboard /wp-admin | 2,210 ▲19 | 5.83 ▲0.94 | 98.20 ▼5.64 | 39.37 ▼5.30 |
Posts /wp-admin/edit.php | 2,096 ▲4 | 2.01 ▼0.03 | 39.29 ▼8.53 | 35.69 ▼7.39 |
Add New Post /wp-admin/post-new.php | 1,517 ▼11 | 17.45 ▼1.00 | 632.33 ▲6.59 | 58.65 ▼2.36 |
Media Library /wp-admin/upload.php | 1,395 ▲4 | 4.25 ▼0.02 | 97.40 ▼3.52 | 43.76 ▼8.90 |
Typeahead Settings /wp-admin/options-general.php?page=typeahead | 800 | 2.06 | 24.77 | 32.99 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- Uninstall procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/typeahead/typeahead.php+42
__autoload() is deprecated, use spl_autoload_register() instead
- This plugin did not uninstall successfully, leaving 7 options in the database
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- typeahead
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=typeahead
- > Deprecated in wp-content/plugins/typeahead/typeahead.php+42
__autoload() is deprecated, use spl_autoload_register() instead
- > GET request to /wp-admin/options-general.php?page=typeahead
- > User notice in wp-includes/functions.php+5905
Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
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
Almost there! Just fix the following items
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/typeahead/typeahead.php:23
- > PHP Fatal error
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 Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: autocomplete, better search, typeahead, suggest, search...
typeahead/typeahead.php Passed 13 tests
The principal PHP file in "Typeahead" v. 0.2.1 is loaded by WordPress automatically on each request
115 characters long description:
Provide autocomplete for search box by typeahead.js.为您的网站搜索框添加搜索下拉词条建议功能。
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin300 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 52 | 15 | 182 |
PO File | 2 | 10 | 10 | 67 |
CSS | 2 | 0 | 0 | 32 |
JavaScript | 3 | 1 | 5 | 19 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.18 |
Average class complexity | 3.33 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 6.00 |
Average method complexity | 1.26 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.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 | 20 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 20 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.91MB with 0.59MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
banner-772x250.png | 45.02KB | 15.92KB | ▼ 64.64% |
screenshot-2.png | 466.58KB | 153.99KB | ▼ 67.00% |
screenshot-1.png | 64.42KB | 22.11KB | ▼ 65.67% |
screenshot-3.png | 311.62KB | 124.78KB | ▼ 59.96% |
screenshot-4.png | 48.83KB | 16.02KB | ▼ 67.19% |