Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼5.67ms] Passed 4 tests
This is a short check of server-side resources used by WPReplace内容字符替换插件
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 40.96 ▲1.97 |
Dashboard /wp-admin | 3.33 ▼0.01 | 55.73 ▼9.41 |
Posts /wp-admin/edit.php | 3.38 ▲0.03 | 50.58 ▲1.12 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.03 | 97.86 ▼16.37 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 37.50 ▲3.91 |
WPRelace设置 /wp-admin/tools.php?page=wpreplace/index.php | 3.22 | 32.09 |
Server storage [IO: ▲1.76MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
WPReplace内容字符替换插件: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.37 ▲0.08 | 1.74 ▲0.09 | 38.12 ▼5.76 |
Dashboard /wp-admin | 2,199 ▲25 | 5.62 ▼0.04 | 90.37 ▲5.58 | 44.51 ▲4.32 |
Posts /wp-admin/edit.php | 2,101 ▼2 | 2.03 ▲0.00 | 39.47 ▼6.64 | 41.71 ▲3.17 |
Add New Post /wp-admin/post-new.php | 1,540 ▲11 | 18.18 ▼4.81 | 651.35 ▲29.15 | 69.79 ▲24.36 |
Media Library /wp-admin/upload.php | 1,407 ▲7 | 4.22 ▲0.03 | 101.29 ▼4.32 | 50.27 ▲3.44 |
WPRelace设置 /wp-admin/tools.php?page=wpreplace/index.php | 1,102 | 2.13 | 32.96 | 103.27 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- Zombie WordPress options were found after uninstall: 6 options
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- can_compress_scripts
- widget_recent-comments
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)
Everything seems fine, however this is by no means an exhaustive test
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
Please fix the following items
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpreplace/index.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 96% from 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
1 plugin tags: wordpress
wpreplace/index.php 92% from 13 tests
Analyzing the main PHP file in "WPReplace内容字符替换插件" version 6.2
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("wpreplace.php" instead of "index.php")
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 plugin417 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 33 | 14 | 207 |
SVG | 1 | 356 | 3 | 195 |
JavaScript | 6 | 0 | 5 | 9 |
CSS | 6 | 0 | 4 | 6 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
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 | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.28MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
layui/images/logo.png | 25.43KB | 0.87KB | ▼ 96.58% |
layui/css/modules/layer/default/icon.png | 11.22KB | 4.36KB | ▼ 61.19% |
screenshot-1.png | 146.01KB | 20.03KB | ▼ 86.28% |
layui/css/modules/layer/default/icon-ext.png | 5.77KB | 2.91KB | ▼ 49.62% |
layui/images/footer_logo.png | 24.74KB | 0.87KB | ▼ 96.48% |