Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼2.53ms] Passed 4 tests
Server-side resources used by WordPress Primary Category
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 45.81 ▲1.84 |
Dashboard /wp-admin | 3.32 ▲0.01 | 48.28 ▼0.74 |
Posts /wp-admin/edit.php | 3.43 ▲0.08 | 47.64 ▼0.82 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 94.47 ▼9.74 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 36.15 ▲1.18 |
Primary Category /wp-admin/options-general.php?page=wp-primary-category | 3.25 | 36.48 |
Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for WordPress Primary Category
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,822 ▲36 | 13.23 ▼1.15 | 2.17 ▲0.05 | 40.61 ▼3.67 |
Dashboard /wp-admin | 2,228 ▲22 | 4.80 ▼0.18 | 111.82 ▲6.22 | 43.37 ▼2.46 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.01 ▼0.02 | 38.33 ▲0.37 | 38.62 ▼0.11 |
Add New Post /wp-admin/post-new.php | 1,551 ▲20 | 23.18 ▼0.05 | 675.82 ▲15.76 | 58.71 ▲8.61 |
Media Library /wp-admin/upload.php | 1,404 ▲10 | 4.31 ▲0.14 | 110.07 ▲10.21 | 47.62 ▲2.77 |
Primary Category /wp-admin/options-general.php?page=wp-primary-category | 798 | 2.02 | 24.83 | 29.89 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test
SRP Passed 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
No output text or server-side errors detected on direct access of PHP files
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: taxonomy, primary, tax, select, cat...
wp-primary-category/plugin.php 92% from 13 tests
The main PHP script in "WordPress Primary Category" version 1.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("wp-primary-category.php" instead of "plugin.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin810 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 110 | 10 | 493 |
Markdown | 1 | 44 | 0 | 211 |
JavaScript | 1 | 15 | 0 | 81 |
CSS | 1 | 2 | 0 | 19 |
XML | 1 | 0 | 0 | 6 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 14.20 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 28.00 |
Average method complexity | 2.83 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 36 | |
▷ Static methods | 36 | 100.00% |
▷ Public methods | 29 | 80.56% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 7 | 19.44% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected