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
Installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼4.21ms] Passed 4 tests
This is a short check of server-side resources used by Allow Only Last Item In Cart
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 42.34 ▲1.13 |
Dashboard /wp-admin | 3.31 ▲0.01 | 48.79 ▼0.19 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 49.62 ▼1.98 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 91.03 ▼15.80 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 38.85 ▲1.96 |
Server storage [IO: ▲0.02MB] [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 |
theysaidso_admin_options |
can_compress_scripts |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for Allow Only Last Item In Cart
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.34 ▲0.07 | 1.75 ▲0.07 | 45.48 ▲3.97 |
Dashboard /wp-admin | 2,198 ▲21 | 5.62 ▼0.05 | 86.71 ▼1.84 | 39.54 ▲1.39 |
Posts /wp-admin/edit.php | 2,100 ▼3 | 2.02 ▼0.00 | 35.29 ▼7.85 | 33.66 ▼4.28 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 22.98 ▼0.06 | 593.12 ▼89.58 | 58.84 ▲3.72 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.23 ▲0.12 | 96.98 ▼12.24 | 39.95 ▼7.17 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test
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 86% 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
These attributes need your attention:
- Screenshots: These screenshots do not have images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is stored in the /assets directory.), #2 (This is the second screen shot)
allow-only-last-item-in-cart/allow_only_last_item_in_cart.php 77% from 13 tests
Analyzing the main PHP file in "Allow Only Last Item In Cart" version 1.0.0
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("allow-only-last-item-in-cart.php" instead of "allow_only_last_item_in_cart.php")
- Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
- Domain Path: The domain path points to a folder that does not exist ("/languages")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin26 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 4 | 51 | 24 |
Markdown | 1 | 0 | 0 | 2 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.67 |
Average class complexity | 5.00 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 5.00 |
Average method complexity | 3.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.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 | 2 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 2 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected