Benchmarks
Plugin footprint 57% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
- The plugin did not install without errors
- > Notice in wp-content/plugins/before-deleting-the-posts/includes/before-deleting-the-posts.php+320
Undefined index: asm_B4DelPosts_Class
Server metrics [RAM: ▼1.77MB] [CPU: ▼185.07ms] Passed 4 tests
A check of server-side resources used by Before deleting the posts
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.85 ▼0.86 | 5.78 ▼16.02 |
Dashboard /wp-admin | 1.87 ▼1.18 | 5.67 ▼44.42 |
Posts /wp-admin/edit.php | 1.87 ▼1.23 | 6.10 ▼37.11 |
Add New Post /wp-admin/post-new.php | 1.87 ▼3.56 | 5.34 ▼638.27 |
Media Library /wp-admin/upload.php | 1.87 ▼1.13 | 6.18 ▼20.49 |
Server storage [IO: ▲0.44MB] [DB: ▲0.00MB] 67% from 3 tests
A short overview of filesystem and database impact
Just a few items left to fix
- There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/before-deleting-the-posts/" and "wp-content/uploads/"
- (new file) wp-content/deleted_posts/.empty
Filesystem: 9 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Before deleting the posts: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,702 ▲106 | 15.76 ▲0.17 | 5.55 ▼3.35 | 46.45 ▼2.25 |
Dashboard /wp-admin | 2,966 ▲35 | 5.88 ▲0.00 | 165.43 ▲25.08 | 115.08 ▲1.91 |
Posts /wp-admin/edit.php | 2,739 ▼0 | 2.68 ▼0.01 | 64.23 ▼2.02 | 90.15 ▲2.30 |
Add New Post /wp-admin/post-new.php | 1,500 ▼2,136 | 18.65 ▲3.73 | 368.13 ▼44.06 | 109.73 ▼15.58 |
Media Library /wp-admin/upload.php | 1,810 ▲3 | 5.00 ▼0.00 | 156.60 ▲5.65 | 118.10 ▲0.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/before-deleting-the-posts/includes/before-deleting-the-posts.php+320
Undefined index: asm_B4DelPosts_Class
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% 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 fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/before-deleting-the-posts/includes/export.php
- 6× PHP files trigger server errors when accessed directly:
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/before-deleting-the-posts/includes/before-deleting-the-posts.php on line 43
- > PHP Notice
Undefined index: asm_B4DelPosts_Class in wp-content/plugins/before-deleting-the-posts/includes/before-deleting-the-posts.php on line 320
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/before-deleting-the-posts/includes/before-deleting-the-posts.php:45
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/before-deleting-the-posts/includes/before-deleting-the-posts.php:45
- > PHP Notice
Undefined index: asm_B4DelPosts_Class in wp-content/plugins/before-deleting-the-posts/includes/before-deleting-the-posts.php on line 320
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/before-deleting-the-posts/includes/before-deleting-the-posts.php on line 43
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
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 need to be fixed:
- Screenshots: Add images for these screenshots: #1 (Trigger "Delete Permanently".), #2 (Backed up deleted posts.), #3 (Backup as Export XML.)
before-deleting-the-posts/before-deleting-the-posts.php Passed 13 tests
"Before deleting the posts" version 0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
43 characters long description:
This plugin backs up before deleting posts.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin631 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 95 | 338 | 631 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 32.00 |
▷ Minimum class complexity | 32.00 |
▷ Maximum class complexity | 32.00 |
Average method complexity | 3.38 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.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 | 13 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 13 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 14 | |
▷ Named functions | 14 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.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
3 PNG files occupy 0.40MB with 0.27MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 77.91KB | 23.08KB | ▼ 70.38% |
screenshot-3.png | 140.13KB | 48.63KB | ▼ 65.29% |
screenshot-2.png | 195.57KB | 68.53KB | ▼ 64.96% |