Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.09MB] [CPU: ▲1.81ms] Passed 4 tests
This is a short check of server-side resources used by Content Promoter - Generate leads by promoting content
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.66 ▲0.19 | 41.96 ▼5.06 |
Dashboard /wp-admin | 3.38 ▲0.08 | 54.50 ▲5.09 |
Posts /wp-admin/edit.php | 3.49 ▲0.14 | 55.18 ▲9.15 |
Add New Post /wp-admin/post-new.php | 5.97 ▲0.08 | 93.39 ▼1.93 |
Media Library /wp-admin/upload.php | 3.30 ▲0.07 | 44.31 ▲10.22 |
Getting Started /wp-admin/admin.php?page=content-promoter-getting-started | 3.48 | 62.48 |
New Item /wp-admin/post-new.php?post_type=content-promoter | 3.56 | 113.44 |
Items /wp-admin/edit.php?post_type=content-promoter | 3.34 | 40.87 |
Settings /wp-admin/admin.php?page=content-promoter-settings | 3.38 | 56.97 |
Dashboard /wp-admin/admin.php?page=content-promoter | 3.39 | 64.55 |
Server storage [IO: ▲0.65MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 190 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
ctpr_settings_page_data |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Content Promoter - Generate leads by promoting content
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,899 ▲153 | 13.21 ▼1.14 | 1.76 ▼0.07 | 41.98 ▼0.97 |
Dashboard /wp-admin | 2,281 ▲96 | 5.87 ▲0.03 | 104.47 ▼17.14 | 42.33 ▲0.06 |
Posts /wp-admin/edit.php | 2,164 ▲75 | 2.00 ▼0.03 | 39.17 ▲1.53 | 34.83 ▲0.98 |
Add New Post /wp-admin/post-new.php | 6,471 ▲4,938 | 20.45 ▼3.07 | 934.68 ▲279.75 | 59.75 ▲7.21 |
Media Library /wp-admin/upload.php | 1,466 ▲81 | 4.22 ▲0.06 | 100.45 ▼1.59 | 42.80 ▼0.90 |
Getting Started /wp-admin/admin.php?page=content-promoter-getting-started | 1,665 | 4.96 | 77.55 | 138.72 |
New Item /wp-admin/post-new.php?post_type=content-promoter | 2,913 | 5.79 | 108.53 | 53.27 |
Items /wp-admin/edit.php?post_type=content-promoter | 1,133 | 1.93 | 30.99 | 29.27 |
Settings /wp-admin/admin.php?page=content-promoter-settings | 1,687 | 4.86 | 56.30 | 93.69 |
Dashboard /wp-admin/admin.php?page=content-promoter | 1,793 | 4.87 | 80.77 | 79.55 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- The uninstall procedure has failed, leaving 7 options in the database
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- ctpr_settings_page_data
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
Even though no errors were found, 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
Please take a closer look at the following
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Class 'ContentPromoter\\Core\\Libs\\Vendors\\AbstractRegistryFormat' not found in wp-content/plugins/content-promoter/Inc/Core/Libs/Vendors/Format/Json.php:18
- > PHP Fatal error
Uncaught Error: Class 'ContentPromoter\\Core\\Libs\\Vendors\\AbstractRegistryFormat' not found in wp-content/plugins/content-promoter/Inc/Core/Libs/Vendors/Format/Php.php:18
- > PHP Fatal error
Uncaught Error: Class 'ContentPromoter\\Core\\Libs\\Vendors\\AbstractRegistryFormat' not found in wp-content/plugins/content-promoter/Inc/Core/Libs/Vendors/Format/Ini.php:20
- > 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 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: leads, generate leads, conversion, promote content, promotion...
content-promoter/content-promoter.php 85% from 13 tests
The primary PHP file in "Content Promoter - Generate leads by promoting content" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Requires at least: Required version does not match the one declared in readme.txt ("4.9.0" instead of "5.4")
- Requires PHP: Required version does not match the one declared in readme.txt ("7.1" instead of "7.1.0")
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
Success! There were no dangerous files found in this plugin7,417 lines of code in 140 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 97 | 1,108 | 1,650 | 6,154 |
JavaScript | 23 | 323 | 129 | 1,219 |
CSS | 17 | 16 | 0 | 16 |
XML | 1 | 0 | 0 | 14 |
JSON | 1 | 0 | 0 | 13 |
SVG | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 9.34 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 85.00 |
Average method complexity | 3.41 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 33.00 |
Code structure | ||
---|---|---|
Namespaces | 11 | |
Interfaces | 2 | |
Traits | 0 | |
Classes | 57 | |
▷ Abstract classes | 2 | 3.51% |
▷ Concrete classes | 55 | 96.49% |
▷ Final classes | 1 | 1.82% |
Methods | 212 | |
▷ Static methods | 44 | 20.75% |
▷ Public methods | 178 | 83.96% |
▷ Protected methods | 9 | 4.25% |
▷ Private methods | 25 | 11.79% |
Functions | 26 | |
▷ Named functions | 2 | 7.69% |
▷ Anonymous functions | 24 | 92.31% |
Constants | 23 | |
▷ Global constants | 16 | 69.57% |
▷ Class constants | 7 | 30.43% |
▷ Public constants | 7 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.07MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
media/admin/img/preview/black_friday_sale.png | 10.33KB | 5.15KB | ▼ 50.18% |
media/admin/img/welcome/configure.png | 3.56KB | 3.62KB | 0.00% |
media/admin/img/preview/cta.png | 11.70KB | 5.38KB | ▼ 54.00% |
media/admin/img/welcome/selection.png | 2.86KB | 2.86KB | 0.00% |
media/admin/img/welcome/save.png | 1.06KB | 1.06KB | 0.18% |