Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▼0.67MB] [CPU: ▼21.09ms] Passed 4 tests
Analyzing server-side resources used by sprInvoice
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 39.56 ▼0.43 |
Dashboard /wp-admin | 3.34 ▼0.00 | 50.61 ▼8.32 |
Posts /wp-admin/edit.php | 3.39 ▲0.04 | 50.53 ▲0.09 |
Add New Post /wp-admin/post-new.php | 3.13 ▼2.76 | 35.55 ▼75.69 |
Media Library /wp-admin/upload.php | 3.26 ▲0.04 | 35.99 ▲1.50 |
sprInvoice Settings /wp-admin/options-general.php?page=spr-invoice-admin | 3.21 | 30.58 |
Add New /wp-admin/post-new.php?post_type=invoice | 3.12 | 34.34 |
Invoice /wp-admin/edit.php?post_type=invoice | 3.31 | 36.25 |
Server storage [IO: ▲0.18MB] [DB: ▲0.07MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for sprInvoice
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,848 ▲87 | 14.42 ▲0.04 | 1.81 ▼0.14 | 44.77 ▲4.57 |
Dashboard /wp-admin | 2,229 ▲51 | 5.65 ▼0.10 | 92.58 ▼13.82 | 38.40 ▼1.65 |
Posts /wp-admin/edit.php | 2,134 ▲34 | 2.00 ▼0.00 | 40.78 ▼3.16 | 39.49 ▲3.24 |
Add New Post /wp-admin/post-new.php | 1,389 ▼160 | 17.01 ▼6.39 | 555.37 ▼46.15 | 53.89 ▲0.88 |
Media Library /wp-admin/upload.php | 1,428 ▲25 | 4.22 ▲0.01 | 102.57 ▼2.28 | 41.46 ▼4.21 |
sprInvoice Settings /wp-admin/options-general.php?page=spr-invoice-admin | 892 | 2.05 | 25.29 | 40.13 |
Add New /wp-admin/post-new.php?post_type=invoice | 1,855 | 2.68 | 54.42 | 62.69 |
Invoice /wp-admin/edit.php?post_type=invoice | 1,095 | 1.99 | 30.59 | 31.44 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
- > GET request to /wp-admin/options-general.php?page=spr-invoice-admin
- > User deprecated in wp-includes/functions.php+5463
Function screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/options-general.php?page=spr-invoice-admin
- > User deprecated in wp-includes/functions.php+5463
Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/post-new.php?post_type=invoice
- > Notice in wp-content/plugins/spr-invoice/sprinvoice.php+519
Undefined index: spr_meta_email
- > GET request to /wp-admin/post-new.php?post_type=invoice
- > Notice in wp-content/plugins/spr-invoice/sprinvoice.php+527
Undefined index: spr_meta_address_1
- > GET request to /wp-admin/post-new.php?post_type=invoice
- > Notice in wp-content/plugins/spr-invoice/sprinvoice.php+545
Undefined index: rowname
- > GET request to /wp-admin/post-new.php?post_type=invoice
- > Notice in wp-content/plugins/spr-invoice/sprinvoice.php+546
Undefined index: rowcount
- > GET request to /wp-admin/post-new.php?post_type=invoice
- > Notice in wp-content/plugins/spr-invoice/sprinvoice.php+547
Undefined index: rowcost
- > GET request to /wp-admin/post-new.php?post_type=invoice
- > Warning in wp-content/plugins/spr-invoice/sprinvoice.php+552
count(): Parameter must be an array or an object that implements Countable
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 fix the following
- 4× PHP files trigger server errors when accessed directly:
- > PHP Notice
Undefined variable: options in wp-content/plugins/spr-invoice/invoice-template.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/spr-invoice/invoice-template.php:10
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/spr-invoice/invoice-template.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/spr-invoice/sprinvoice.php:270
- > PHP Notice
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 errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
- Screenshots: These screenshots require images: #1 (What a generated invoice will look like), #2 (Creating a new invoice), #3 (General invoice settings for company/user information)
- Plugin Name: You should set the name of your plugin on the first line (
=== spr-invoice ===
)
spr-invoice/sprinvoice.php 92% from 13 tests
The principal PHP file in "sprInvoice" v. 0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("spr-invoice.php" instead of "sprinvoice.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,047 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 135 | 27 | 641 |
CSS | 3 | 21 | 19 | 406 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 19.00 |
▷ Minimum class complexity | 19.00 |
▷ Maximum class complexity | 19.00 |
Average method complexity | 2.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.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 | 15 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 15 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 8 | |
▷ Named functions | 8 | 100.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
3 PNG files occupy 0.14MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-3.png | 41.82KB | 23.48KB | ▼ 43.85% |
screenshot-1.png | 37.36KB | 19.51KB | ▼ 47.79% |
screenshot-2.png | 62.35KB | 32.46KB | ▼ 47.95% |