Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼4.69ms] Passed 4 tests
A check of server-side resources used by Civic Lookup
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.02 | 40.96 ▲0.64 |
Dashboard /wp-admin | 3.33 ▲0.03 | 51.78 ▼4.04 |
Posts /wp-admin/edit.php | 3.45 ▲0.09 | 54.15 ▲0.55 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.03 | 92.23 ▼15.90 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 40.56 ▲3.52 |
Civic Lookup /wp-admin/options-general.php?page=mt-cglu | 3.22 | 34.45 |
Server storage [IO: ▲0.63MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
Civic Lookup: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,875 ▲114 | 13.48 ▼0.92 | 8.40 ▲6.69 | 43.68 ▲0.59 |
Dashboard /wp-admin | 2,196 ▲19 | 5.54 ▲0.01 | 83.46 ▼13.17 | 37.79 ▼9.26 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 2.02 ▲0.01 | 35.85 ▼1.16 | 36.88 ▲0.11 |
Add New Post /wp-admin/post-new.php | 1,544 ▲5 | 22.62 ▼0.39 | 653.35 ▼5.39 | 54.49 ▼8.91 |
Media Library /wp-admin/upload.php | 1,404 ▲7 | 4.14 ▼0.05 | 113.50 ▲12.64 | 46.57 ▼0.90 |
Civic Lookup /wp-admin/options-general.php?page=mt-cglu | 1,058 | 2.00 | 25.10 | 29.28 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- can_compress_scripts
- db_upgraded
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
SRP 0% 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
Please fix the following items
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/civic-geo/src/blocks/legislators_start.php
- 9× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/civic-geo/src/shortcodes.php:8
- > PHP Notice
Undefined variable: lookup in wp-content/plugins/civic-geo/src/blocks/lookup.php on line 9
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/civic-geo/src/install.php:5
- > PHP Fatal error
Uncaught Error: Call to a member function getRedirect() on null in wp-content/plugins/civic-geo/src/blocks/lookup.php:9
- > PHP Fatal error
Uncaught Error: Class 'CivicLookup\\PodTable' not found in wp-content/plugins/civic-geo/src/classes/Person.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/civic-geo/src/admin.php:12
- > PHP Fatal error
Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/civic-geo/src/commands.php:6
- > PHP Fatal error
Uncaught Error: Class 'CivicLookup\\PodTable' not found in wp-content/plugins/civic-geo/src/classes/PodRecord.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/civic-geo/src/enqueue.php:5
- > PHP Fatal error
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
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: congress
civic-geo/civic-lookup.php 92% from 13 tests
The primary PHP file in "Civic Lookup" version 1.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("civic-geo.php" instead of "civic-lookup.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin2,015 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 15 | 313 | 547 | 1,705 |
JSON | 1 | 0 | 0 | 297 |
CSS | 1 | 4 | 0 | 13 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 29.67 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 107.00 |
Average method complexity | 2.81 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 48.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 95 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 95 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 13 | |
▷ Named functions | 13 | 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 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.54MB with 0.41MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/ScreenShotCivicLookup.png | 276.33KB | 64.94KB | ▼ 76.50% |
ScreenShotCivicLookup.png | 276.33KB | 64.94KB | ▼ 76.50% |