Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.09MB] [CPU: ▼5.19ms] Passed 4 tests
This is a short check of server-side resources used by Replace Contents
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.09 | 38.28 ▼6.22 |
Dashboard /wp-admin | 3.40 ▲0.09 | 49.28 ▼0.65 |
Posts /wp-admin/edit.php | 3.45 ▲0.09 | 46.14 ▼5.41 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.09 | 83.03 ▼7.20 |
Media Library /wp-admin/upload.php | 3.32 ▲0.09 | 33.26 ▼1.91 |
Replace Contents /wp-admin/tools.php?page=replacecontents | 3.29 | 32.94 |
Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for Replace Contents
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲57 | 14.72 ▲0.07 | 1.91 ▲0.36 | 43.73 ▲4.44 |
Dashboard /wp-admin | 2,193 ▲16 | 5.57 ▲0.03 | 88.05 ▼11.22 | 39.24 ▼2.98 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 2.03 ▲0.02 | 38.09 ▼5.47 | 34.49 ▼2.35 |
Add New Post /wp-admin/post-new.php | 1,529 ▲2 | 23.12 ▲0.06 | 649.27 ▼122.25 | 61.35 ▲0.31 |
Media Library /wp-admin/upload.php | 1,407 ▲7 | 4.20 ▲0.09 | 94.56 ▼23.90 | 43.59 ▼4.24 |
Replace Contents /wp-admin/tools.php?page=replacecontents | 1,272 | 2.03 | 30.60 | 29.55 |
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
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 3× 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/replace-contents/lib/class-replacecontents.php:38
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/replace-contents/lib/class-replacecontents.php:38
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/replace-contents/lib/class-replacecontentsadmin.php:36
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: html, contents, content, replace
replace-contents/replacecontents.php 92% from 13 tests
The main PHP script in "Replace Contents" version 1.09 is automatically included on every request by WordPress
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("replace-contents.php" instead of "replacecontents.php")
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
Success! There were no dangerous files found in this plugin1,752 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 1 | 41 | 48 | 1,222 |
PHP | 4 | 64 | 141 | 518 |
JavaScript | 1 | 3 | 17 | 12 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 30.00 |
▷ Minimum class complexity | 16.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 4.22 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 10 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 8 | 80.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 20.00% |
Functions | 2 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 2 | 100.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.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
PNG images were not found in this plugin