Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼8.18ms] Passed 4 tests
This is a short check of server-side resources used by WPGContacts
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 46.44 ▲0.16 |
Dashboard /wp-admin | 3.34 ▼0.00 | 52.72 ▼13.16 |
Posts /wp-admin/edit.php | 3.40 ▲0.04 | 52.98 ▼0.36 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 90.99 ▼14.62 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 33.05 ▼4.58 |
Server storage [IO: ▲4.80MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 944 new files
Database: no new tables, 13 new options
New WordPress options |
---|
wpgoco_token |
wpgoco_verify |
db_upgraded |
theysaidso_admin_options |
can_compress_scripts |
wpgoco_ninjaform_field_map |
wpgoco_gravityform_field_map |
widget_recent-posts |
wpgoco_access_code |
widget_recent-comments |
... |
Browser metrics Passed 4 tests
WPGContacts: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,805 ▲19 | 14.35 ▼0.01 | 1.81 ▼0.24 | 41.49 ▼2.48 |
Dashboard /wp-admin | 2,211 ▲37 | 5.64 ▲0.10 | 88.12 ▼3.03 | 40.66 ▼0.14 |
Posts /wp-admin/edit.php | 2,116 ▲16 | 1.98 ▲0.01 | 40.32 ▲4.08 | 35.82 ▼0.53 |
Add New Post /wp-admin/post-new.php | 1,539 ▲6 | 23.51 ▲0.26 | 711.28 ▲53.52 | 52.82 ▲0.04 |
Media Library /wp-admin/upload.php | 1,419 ▲19 | 4.17 ▲0.00 | 96.26 ▼10.44 | 42.46 ▼5.06 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- Uninstall procedure validation failed for this plugin
- > Warning in wp-content/plugins/wpgcontacts/WPGContacts.php+171
Use of undefined constant WP_GOOGLE_CONTACT_FREE_PRODUCT_NAME - assumed 'WP_GOOGLE_CONTACT_FREE_PRODUCT_NAME' (this will throw an Error in a future version of PHP)
- This plugin did not uninstall successfully, leaving 10 options in the database
- wpgoco_wpform_field_map
- wpgoco_cf7_field_map
- widget_recent-posts
- wpgoco_ninjaform_field_map
- wpgoco_gravityform_field_map
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
- 508× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/wpgcontacts/lib/vendor/guzzlehttp/psr7/src/UploadedFile.php:10
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/wpgcontacts/lib/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
- > PHP Warning
Class 'Google\\Http\\Batch' not found in wp-content/plugins/wpgcontacts/lib/vendor/google/apiclient/src/aliases.php on line 33
- > PHP Fatal error
Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/wpgcontacts/lib/vendor/google/apiclient-services/src/PeopleService/UpdateContactGroupRequest.php:20
- > PHP Fatal error
Uncaught Error: Class 'Google\\Service\\Resource' not found in wp-content/plugins/wpgcontacts/lib/vendor/google/apiclient-services/src/PeopleService/Resource/People.php:43
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/wpgcontacts/lib/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php:24
- > PHP Fatal error
Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/wpgcontacts/lib/vendor/google/apiclient-services/src/PeopleService/Photo.php:20
- > PHP Fatal error
Uncaught Error: Class 'phpseclib3\\Math\\BigInteger\\Engines\\BCMath\\Reductions\\Barrett' not found in wp-content/plugins/wpgcontacts/lib/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/DefaultEngine.php:23
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/wpgcontacts/lib/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php:27
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/wpgcontacts/lib/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php:26
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: google contacts integrations, gravity forms, contact form 7, gcontacts, wpforms...
wpgcontacts/WPGContacts.php 77% from 13 tests
The main PHP script in "WPGContacts" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
- Text Domain: The text domain should only use lowercase characters and dashes
- Requires at least: Required version does not match the one declared in readme.txt ("5.3" instead of "4.9")
- Main file name: It is recommended to name the main PHP file as the plugin slug ("wpgcontacts.php" instead of "WPGContacts.php")
Code Analysis 97% from 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 plugin94,857 lines of code in 901 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 837 | 13,137 | 48,595 | 86,152 |
Markdown | 31 | 1,769 | 0 | 5,265 |
JSON | 22 | 0 | 0 | 2,367 |
CSS | 1 | 54 | 34 | 421 |
JavaScript | 1 | 53 | 52 | 297 |
PO File | 1 | 91 | 94 | 232 |
YAML | 5 | 22 | 3 | 91 |
XML | 1 | 0 | 0 | 19 |
Dockerfile | 1 | 8 | 0 | 10 |
Bourne Shell | 1 | 2 | 0 | 3 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
These items need your attention
- Please reduce cyclomatic complexity of methods to less than 100 (currently 179)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 11.35 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 670.00 |
Average method complexity | 2.71 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 179.00 |
Code structure | ||
---|---|---|
Namespaces | 86 | |
Interfaces | 39 | |
Traits | 14 | |
Classes | 760 | |
▷ Abstract classes | 217 | 28.55% |
▷ Concrete classes | 543 | 71.45% |
▷ Final classes | 44 | 8.10% |
Methods | 4,835 | |
▷ Static methods | 729 | 15.08% |
▷ Public methods | 3,916 | 80.99% |
▷ Protected methods | 396 | 8.19% |
▷ Private methods | 523 | 10.82% |
Functions | 216 | |
▷ Named functions | 75 | 34.72% |
▷ Anonymous functions | 141 | 65.28% |
Constants | 676 | |
▷ Global constants | 95 | 14.05% |
▷ Class constants | 581 | 85.95% |
▷ Public constants | 546 | 93.98% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.12MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/vendor/rapidwebltd/php-google-people-api/assets/images/php-google-people-api.png | 78.10KB | 35.91KB | ▼ 54.02% |
assets/img/permission_screen.png | 29.71KB | 9.43KB | ▼ 68.24% |
assets/img/help.png | 1.51KB | 1.35KB | ▼ 10.25% |
assets/img/cf7.png | 1.15KB | 0.56KB | ▼ 51.53% |
assets/img/arrow.png | 4.19KB | 2.29KB | ▼ 45.36% |