Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼298.50ms] Passed 4 tests
Analyzing server-side resources used by Random One Cat Widget
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.05 | 54.05 ▲1.48 |
Dashboard /wp-admin | 3.45 ▲0.04 | 35.31 ▲2.05 |
Posts /wp-admin/edit.php | 3.68 ▲0.04 | 35.93 ▼1.33 |
Add New Post /wp-admin/post-new.php | 6.92 ▼0.05 | 92.95 ▼1,196.21 |
Media Library /wp-admin/upload.php | 3.33 ▲0.04 | 24.81 ▲3.03 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 1 new option
New WordPress options |
---|
widget_random_one_cat_widget |
Browser metrics Passed 4 tests
Random One Cat Widget: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,783 ▲29 | 16.18 ▲0.51 | 5.66 ▼0.45 | 2.45 ▼0.18 |
Dashboard /wp-admin | 2,895 ▲34 | 6.22 ▲0.10 | 117.73 ▼13.17 | 155.06 ▼4.50 |
Posts /wp-admin/edit.php | 2,688 ▼6 | 3.23 ▼0.00 | 63.40 ▼1.90 | 139.54 ▲2.64 |
Add New Post /wp-admin/post-new.php | 1,752 ▲91 | 21.39 ▲5.69 | 446.15 ▲59.97 | 153.72 ▼1.07 |
Media Library /wp-admin/upload.php | 1,698 ▼0 | 5.52 ▼0.01 | 138.40 ▼3.98 | 183.59 ▼9.30 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 1 option
- widget_random_one_cat_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
The smoke test was a success, however most plugin functionality was not tested
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
Please take a closer look at the following
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/random-one-cat-widget/random-one-cat-widget.php:29
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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 important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: widget, random post, random, post
random-one-cat-widget/random-one-cat-widget.php Passed 13 tests
"Random One Cat Widget" version 2.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
53 characters long description:
This widget shows random posts from a given category.
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
No dangerous file extensions were detected144 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 28 | 22 | 144 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 35.00 |
▷ Minimum class complexity | 35.00 |
▷ Maximum class complexity | 35.00 |
Average method complexity | 9.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 26.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 1 | 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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin