Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.02MB] [CPU: ▼142.62ms] Passed 4 tests
Server-side resources used by Social Media Post Generator
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.12 | 35.60 ▲10.26 |
Dashboard /wp-admin | 3.08 ▲0.02 | 47.20 ▼9.31 |
Posts /wp-admin/edit.php | 3.16 ▲0.05 | 45.15 ▼5.13 |
Add New Post /wp-admin/post-new.php | 5.43 ▲0.00 | 94.49 ▼553.71 |
Media Library /wp-admin/upload.php | 3.02 ▲0.02 | 33.27 ▼2.31 |
Server storage [IO: ▲1.42MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 63 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Social Media Post Generator
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,713 ▲66 | 17.25 ▲1.31 | 8.62 ▼2.67 | 50.35 ▼3.52 |
Dashboard /wp-admin | 3,001 ▲74 | 7.70 ▲1.80 | 157.69 ▼0.21 | 116.99 ▼11.84 |
Posts /wp-admin/edit.php | 2,773 ▲34 | 3.76 ▲1.06 | 76.23 ▲12.13 | 107.17 ▲7.43 |
Add New Post /wp-admin/post-new.php | 1,631 ▲133 | 19.07 ▲0.20 | 407.05 ▲32.59 | 116.99 ▼1.27 |
Media Library /wp-admin/upload.php | 1,844 ▲34 | 6.23 ▲1.22 | 144.84 ▼18.56 | 128.11 ▲5.73 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables
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)
Good news, no errors were detected
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
The following issues need your attention
- 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'SMPG_IDesignData' not found in wp-content/plugins/social-media-post-generator/designs/QuoteDesign.php:5
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/social-media-post-generator/vendor/league/color-extractor/tests/League/ColorExtractor/Test/PaletteTest.php:9
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/social-media-post-generator/vendor/gumlet/php-image-resize/test/ImageResizeExceptionTest.php:7
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/social-media-post-generator/posts-wp-list-table.php on line 4
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/social-media-post-generator/vendor/gumlet/php-image-resize/test/ImageResizeTest.php:7
- > PHP Fatal error
Uncaught Error: Interface 'SMPG_IDesignData' not found in wp-content/plugins/social-media-post-generator/designs/BlackWhiteBadges.php:5
- > PHP Fatal error
Uncaught Error: Interface 'SMPG_IDesignData' not found in wp-content/plugins/social-media-post-generator/designs/BasicDesign.php:5
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-media-post-generator/posts-wp-list-table.php on line 4
- > PHP Warning
require(wp-content/plugins/social-media-post-generator/vendor/league/color-extractor/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/social-media-post-generator/vendor/league/color-extractor/tests/bootstrap.php on line 3
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/social-media-post-generator/posts-wp-list-table.php on line 4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: image, social, media, automation, generation
social-media-post-generator/index.php 92% from 13 tests
"Social Media Post Generator" version 0.2.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("social-media-post-generator.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin13,128 lines of code in 46 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 2 | 103 | 7,347 | 9,826 |
PHP | 30 | 712 | 588 | 2,581 |
Markdown | 4 | 161 | 0 | 352 |
JSON | 5 | 0 | 0 | 298 |
YAML | 2 | 8 | 0 | 40 |
XML | 2 | 0 | 0 | 27 |
CSS | 1 | 0 | 0 | 4 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.23 |
Average class complexity | 11.55 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 103.00 |
Average method complexity | 2.44 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 37.00 |
Code structure | ||
---|---|---|
Namespaces | 5 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 21 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 21 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 163 | |
▷ Static methods | 39 | 23.93% |
▷ Public methods | 144 | 88.34% |
▷ Protected methods | 13 | 7.98% |
▷ Private methods | 6 | 3.68% |
Functions | 11 | |
▷ Named functions | 10 | 90.91% |
▷ Anonymous functions | 1 | 9.09% |
Constants | 11 | |
▷ Global constants | 1 | 9.09% |
▷ Class constants | 10 | 90.91% |
▷ Public constants | 10 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.39MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/league/color-extractor/tests/assets/test.png | 289.38KB | 81.88KB | ▼ 71.70% |
vendor/league/color-extractor/tests/assets/red-transparent-50.png | 0.07KB | 0.09KB | 0.00% |
(invalid) designs/tmp/image.png | 3.88KB | 0.00KB | ▼ 100.00% |
vendor/league/color-extractor/tests/assets/google.png | 21.29KB | 6.96KB | ▼ 67.29% |
(invalid) designs/tmp/image2.png | 80.32KB | 0.00KB | ▼ 100.00% |