Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▲0.12MB] [CPU: ▼6.11ms] Passed 4 tests
Analyzing server-side resources used by WP Mercure
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.09 | 43.64 ▲3.90 |
Dashboard /wp-admin | 3.44 ▲0.13 | 56.14 ▲6.19 |
Posts /wp-admin/edit.php | 3.55 ▲0.19 | 50.73 ▼3.63 |
Add New Post /wp-admin/post-new.php | 6.02 ▲0.13 | 98.51 ▲2.24 |
Media Library /wp-admin/upload.php | 3.36 ▲0.13 | 36.71 ▼26.96 |
Mercure /wp-admin/admin.php?page=wpmercure-admin | 3.33 | 34.56 |
Features /wp-admin/admin.php?page=wpmercure-features | 3.33 | 36.20 |
Server storage [IO: ▲2.06MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 156 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
WP Mercure: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,827 ▲27 | 13.24 ▼0.39 | 1.86 ▼0.17 | 41.57 ▼2.26 |
Dashboard /wp-admin | 2,233 ▲24 | 5.86 ▲0.81 | 109.10 ▼1.02 | 41.73 ▼3.41 |
Posts /wp-admin/edit.php | 2,116 ▲24 | 2.03 ▼0.02 | 40.33 ▲1.05 | 34.87 ▼1.51 |
Add New Post /wp-admin/post-new.php | 1,555 ▲9 | 23.28 ▼0.77 | 601.31 ▼142.63 | 48.94 ▼4.00 |
Media Library /wp-admin/upload.php | 1,415 ▲27 | 4.17 ▼0.04 | 101.48 ▼3.58 | 43.84 ▲3.02 |
Mercure /wp-admin/admin.php?page=wpmercure-admin | 832 | 2.04 | 25.15 | 31.19 |
Features /wp-admin/admin.php?page=wpmercure-features | 830 | 2.03 | 24.78 | 24.98 |
Uninstaller [IO: ✅] [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
It is recommended to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
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)
Everything seems fine, however this is by no means an exhaustive test
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
- 58× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Amp\\Http\\Client\\EventListener' not found in wp-content/plugins/wp-mercure/vendor/symfony/http-client/Internal/AmpListener.php:26
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Contracts\\HttpClient\\Exception\\ServerExceptionInterface' not found in wp-content/plugins/wp-mercure/vendor/symfony/http-client/Exception/ServerException.php:21
- > PHP Fatal error
Uncaught Exception: You cannot run this script directly, it's a fixture for TestHttpServer. in wp-content/plugins/wp-mercure/vendor/symfony/http-client-contracts/Test/Fixtures/web/index.php:5
- > PHP Fatal error
Cannot declare class JsonException, because the name is already in use in wp-content/plugins/wp-mercure/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php on line 12
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Contracts\\HttpClient\\Exception\\ExceptionInterface' not found in wp-content/plugins/wp-mercure/vendor/symfony/http-client-contracts/Exception/DecodingExceptionInterface.php:19
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Contracts\\HttpClient\\Exception\\HttpExceptionInterface' not found in wp-content/plugins/wp-mercure/vendor/symfony/http-client-contracts/Exception/ClientExceptionInterface.php:19
- > PHP Fatal error
Uncaught Error: Class 'WpMercure\\Features\\AbstractFeature' not found in wp-content/plugins/wp-mercure/Features/LivePost.php:15
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Contracts\\HttpClient\\HttpClientInterface' not found in wp-content/plugins/wp-mercure/vendor/symfony/http-client/NoPrivateNetworkHttpClient.php:28
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-mercure/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php:18
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/wp-mercure/vendor/psr/container/src/NotFoundExceptionInterface.php:11
- > 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 96% from 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: notification, real-time, realtime, update, mercure...
wp-mercure/wp-mercure.php 92% from 13 tests
The main PHP script in "WP Mercure" version 0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
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
No dangerous file extensions were detected8,588 lines of code in 135 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 108 | 1,907 | 2,699 | 7,381 |
JSON | 12 | 0 | 0 | 912 |
Markdown | 12 | 71 | 0 | 203 |
PO File | 1 | 16 | 16 | 49 |
JavaScript | 2 | 7 | 1 | 43 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.46 |
Average class complexity | 12.89 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 161.00 |
Average method complexity | 3.25 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 39.00 |
Code structure | ||
---|---|---|
Namespaces | 25 | |
Interfaces | 22 | |
Traits | 7 | |
Classes | 73 | |
▷ Abstract classes | 5 | 6.85% |
▷ Concrete classes | 68 | 93.15% |
▷ Final classes | 33 | 48.53% |
Methods | 484 | |
▷ Static methods | 77 | 15.91% |
▷ Public methods | 415 | 85.74% |
▷ Protected methods | 10 | 2.07% |
▷ Private methods | 59 | 12.19% |
Functions | 91 | |
▷ Named functions | 13 | 14.29% |
▷ Anonymous functions | 78 | 85.71% |
Constants | 13 | |
▷ Global constants | 1 | 7.69% |
▷ Class constants | 12 | 92.31% |
▷ Public constants | 11 | 91.67% |
Plugin size 0% from 2 tests
Image compression 0% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 1.62MB with 1.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
(invalid) assets/._icon-256x256.png | 4.00KB | 0.00KB | ▼ 100.00% |
assets/icon-256x256.png | 29.07KB | 14.02KB | ▼ 51.78% |
assets/screenshot-1.png | 1,611.32KB | 539.75KB | ▼ 66.50% |
assets/icon-128x128.png | 12.35KB | 6.18KB | ▼ 49.98% |