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: ▼4.02ms] Passed 4 tests
This is a short check of server-side resources used by Category Posts in Custom Menu
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 42.87 ▲1.43 |
Dashboard /wp-admin | 3.33 ▲0.02 | 44.45 ▼4.79 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 45.24 ▼3.85 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 87.91 ▼4.91 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 31.65 ▼2.51 |
Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
Category Posts in Custom Menu: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,815 ▲53 | 14.58 ▲0.20 | 1.87 ▼0.18 | 39.77 ▼7.68 |
Dashboard /wp-admin | 2,192 ▲21 | 5.60 ▼0.03 | 93.59 ▼1.28 | 39.46 ▼5.88 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 1.95 ▼0.07 | 40.63 ▲0.07 | 36.02 ▼0.99 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.27 ▼0.23 | 675.65 ▲35.91 | 52.92 ▼15.83 |
Media Library /wp-admin/upload.php | 1,397 ▲3 | 4.22 ▲0.02 | 107.93 ▲7.75 | 44.47 ▼0.98 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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 take a closer look at the following
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Warning
require_once(ABSPATHwp-admin/includes/nav-menu.php): failed to open stream: No such file or directory in wp-content/plugins/category-posts-in-custom-menu/category-posts-in-custom-menu.php on line 34
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/category-posts-in-custom-menu/category-posts-in-custom-menu.php on line 34
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/nav-menu.php' (include_path='.:/usr/share/php') in wp-content/plugins/category-posts-in-custom-menu/category-posts-in-custom-menu.php on line 34
- > PHP Warning
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)
No browser issues were found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Go to Appearance > Menu to enable/disable and set the options for the replacement of Category / Post Tag links by their posts.), #2 (Go to Appearance > Customize to enable/disable and set the options for the replacement of Category / Post Tag links by their posts. (Requires WordPress 5.4 or higher))
category-posts-in-custom-menu/category-posts-in-custom-menu.php Passed 13 tests
The main PHP file in "Category Posts in Custom Menu" ver. 2.1.2 adds more information about the plugin and also serves as the entry point for this plugin
138 characters long description:
Dynamic menus: List all posts from a category in your menu. Also works for tags, custom taxonomies as well as pages and custom post types.
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
Success! There were no dangerous files found in this plugin718 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 138 | 182 | 618 |
JavaScript | 2 | 25 | 33 | 79 |
CSS | 1 | 3 | 3 | 21 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 41.50 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 81.00 |
Average method complexity | 4.52 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 16.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 | 22 | |
▷ Static methods | 1 | 4.55% |
▷ Public methods | 20 | 90.91% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 9.09% |
Functions | 7 | |
▷ Named functions | 4 | 57.14% |
▷ Anonymous functions | 3 | 42.86% |
Constants | 4 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 4 | 100.00% |
▷ Public constants | 4 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 23.79KB | 10.03KB | ▼ 57.86% |