Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
- Install procedure had errors
- > Compile error in wp-content/plugins/we-the-people/inc/template-tags.php+27
Cannot use "self" when no class scope is active
Server metrics [RAM: ▲0.00MB] [CPU: ▼2.23ms] Passed 4 tests
A check of server-side resources used by We The People
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 40.62 ▼1.24 |
Dashboard /wp-admin | 3.31 ▲0.00 | 46.58 ▼6.76 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 47.82 ▲1.93 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 94.87 ▼0.78 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 36.09 ▼0.15 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
We The People: 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,800 ▲65 | 13.26 ▼1.20 | 4.57 ▲2.67 | 44.05 ▼3.39 |
Dashboard /wp-admin | 2,206 ▲18 | 5.86 ▲0.98 | 111.63 ▼2.61 | 47.02 ▲0.79 |
Posts /wp-admin/edit.php | 2,086 ▼3 | 2.01 ▼0.03 | 33.60 ▼2.26 | 35.18 ▼3.00 |
Add New Post /wp-admin/post-new.php | 1,533 ▼9 | 23.80 ▲5.69 | 672.10 ▲37.09 | 48.20 ▼5.45 |
Media Library /wp-admin/upload.php | 1,391 ▼0 | 4.22 ▲0.01 | 98.38 ▼3.03 | 44.09 ▼2.00 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
Smoke tests 75% from 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)
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
- 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Notice
Undefined variable: widget_args in wp-content/plugins/we-the-people/templates/wtp-petition-error.php on line 10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/we-the-people/templates/wtp-petition.php:10
- > PHP Fatal error
Cannot use "self" when no class scope is active in wp-content/plugins/we-the-people/inc/template-tags.php on line 27
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/we-the-people/templates/wtp-petition-error.php:14
- > PHP Fatal error
Cannot use "self" when no class scope is active in wp-content/plugins/we-the-people/inc/template-tags.php on line 27
- > PHP Fatal error
Uncaught Error: Call to a member function get_api_key() on null in wp-content/plugins/we-the-people/inc/tinymce-plugin.php:32
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/we-the-people/templates/wtp-signature-form.php:11
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/we-the-people/inc/widget.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/we-the-people/templates/wtp-petition-widget.php:10
- > 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)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: we the people, america, democracy, white house, government...
we-the-people/we-the-people.php Passed 13 tests
The entry point to "We The People" version 2.0 is a PHP file that has certain tags in its header comment area
52 characters long description:
Display White House petitions on your WordPress site
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected717 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 161 | 461 | 708 |
CSS | 6 | 0 | 0 | 6 |
JavaScript | 3 | 0 | 0 | 3 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 20.75 |
▷ Minimum class complexity | 6.00 |
▷ Maximum class complexity | 61.00 |
Average method complexity | 3.63 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 30 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 24 | 80.00% |
▷ Protected methods | 6 | 20.00% |
▷ Private methods | 0 | 0.00% |
Functions | 7 | |
▷ Named functions | 7 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 9 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 9 | 100.00% |
▷ Public constants | 9 | 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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/insert-petition.png | 1.82KB | 1.58KB | ▼ 13.04% |