Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.04MB] [CPU: ▼9.86ms] Passed 4 tests
Analyzing server-side resources used by Contextual Advertisement Plugin
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 42.97 ▲3.07 |
Dashboard /wp-admin | 3.35 ▲0.01 | 49.35 ▼13.12 |
Posts /wp-admin/edit.php | 3.46 ▲0.11 | 43.11 ▼10.47 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.05 | 83.26 ▼18.93 |
Media Library /wp-admin/upload.php | 3.27 ▲0.05 | 36.62 ▲4.80 |
Ustawienia /wp-admin/admin.php?page=my-submenu-ustawienia | 3.29 | 230.64 |
Statystyki /wp-admin/admin.php?page=my-submenu-statystyki | 3.29 | 221.27 |
Zaawansowane /wp-admin/admin.php?page=my-submenu-zaawansowane | 3.28 | 218.96 |
Server storage [IO: ▲0.51MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 107 new files
Database: 3 new tables, 6 new options
New tables |
---|
context360_credentials |
context360_placements |
context360_websites |
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for Contextual Advertisement Plugin
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,829 ▲83 | 13.29 ▼1.08 | 5.86 ▲4.18 | 46.25 ▲2.11 |
Dashboard /wp-admin | 2,235 ▲43 | 5.86 ▲0.94 | 109.39 ▲1.76 | 40.34 ▼6.10 |
Posts /wp-admin/edit.php | 2,118 ▲26 | 1.99 ▼0.05 | 34.52 ▼7.31 | 32.55 ▼6.34 |
Add New Post /wp-admin/post-new.php | 1,538 ▲24 | 17.75 ▲0.22 | 615.46 ▼4.63 | 50.71 ▲3.64 |
Media Library /wp-admin/upload.php | 1,417 ▲26 | 4.21 ▲0.04 | 97.82 ▼0.24 | 41.16 ▼3.83 |
Ustawienia /wp-admin/admin.php?page=my-submenu-ustawienia | 1,002 | 13.02 | 147.69 | 65.20 |
Statystyki /wp-admin/admin.php?page=my-submenu-statystyki | 826 | 2.35 | 30.67 | 26.40 |
Zaawansowane /wp-admin/admin.php?page=my-submenu-zaawansowane | 809 | 2.19 | 26.08 | 28.27 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- Zombie tables detected upon uninstall: 3 tables
- context360_websites
- context360_credentials
- context360_placements
- Zombie WordPress options were found after uninstall: 6 options
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 4× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/contextual-advertisement/views/partial/statistics/chart.php
- > /wp-content/plugins/contextual-advertisement/views/partial/settings/notice.php
- > /wp-content/plugins/contextual-advertisement/views/partial/footer.php
- > /wp-content/plugins/contextual-advertisement/views/partial/header.php
- 44× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Context360\\Model\\WasSuccessfulInterface' not found in wp-content/plugins/contextual-advertisement/src/Model/Statistics/StatisticsList.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/contextual-advertisement/views/permission.php:2
- > PHP Fatal error
Uncaught Error: Class 'Context360\\Controller\\AbstractRestController' not found in wp-content/plugins/contextual-advertisement/src/Controller/Rest/PlacementLocationsRestController.php:14
- > PHP Fatal error
Uncaught Error: Class 'Context360\\Model\\AbstractValidatableModel' not found in wp-content/plugins/contextual-advertisement/src/Model/Registration/OAuth2Request.php:8
- > PHP Fatal error
Uncaught Error: Class 'Context360\\Controller\\AbstractRestController' not found in wp-content/plugins/contextual-advertisement/src/Controller/Rest/RegistrationRestController.php:13
- > PHP Fatal error
Uncaught Error: Class 'Context360\\Controller\\AbstractViewController' not found in wp-content/plugins/contextual-advertisement/src/Controller/View/StatisticsViewController.php:15
- > PHP Fatal error
Uncaught Error: Class 'Context360\\Service\\AuthorizedApiClient' not found in wp-content/plugins/contextual-advertisement/src/Service/Statistics/StatisticsApiClient.php:12
- > PHP Fatal error
Uncaught Error: Interface 'Context360\\Assets\\AssetLoaderInterface' not found in wp-content/plugins/contextual-advertisement/src/Assets/Loaders/AdminAssetsLoader.php:7
- > PHP Fatal error
Uncaught Error: Class 'Context360\\Service\\AuthorizedApiClient' not found in wp-content/plugins/contextual-advertisement/src/Service/Placements/PlacementsApiClient.php:12
- > PHP Fatal error
Uncaught Error: Call to a member function set() on null in wp-content/plugins/contextual-advertisement/config/config.php:6
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
- > GET request to /wp-admin/admin.php?page=my-submenu-statystyki
- > Javascript (severe) in unknown
/wp-content/plugins/contextual-advertisement/assets/js/Chart.min.js?ver=1.2.6 6:76630 Uncaught TypeError: Cannot read properties of null (reading 'length')
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 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
Attributes that require attention:
- Screenshots: Add images for these screenshots: #1 (This screen shot description corresponds registration), #2 (This screen shot description corresponds placements)
contextual-advertisement/context360.php 77% from 13 tests
The main PHP script in "Contextual Advertisement Plugin" version 1.2.6 is automatically included on every request by WordPress
You should first fix the following items:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("contextual-advertisement.php" instead of "context360.php")
- Domain Path: The domain path is invalid: folder "/languages" does not exist
- 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
Success! There were no dangerous files found in this plugin3,550 lines of code in 103 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 96 | 848 | 1,033 | 3,067 |
JavaScript | 6 | 55 | 73 | 269 |
CSS | 1 | 60 | 32 | 214 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.16 |
Average class complexity | 2.36 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 10.00 |
Average method complexity | 1.45 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 28 | |
Interfaces | 4 | |
Traits | 0 | |
Classes | 76 | |
▷ Abstract classes | 4 | 5.26% |
▷ Concrete classes | 72 | 94.74% |
▷ Final classes | 0 | 0.00% |
Methods | 242 | |
▷ Static methods | 7 | 2.89% |
▷ Public methods | 210 | 86.78% |
▷ Protected methods | 29 | 11.98% |
▷ Private methods | 3 | 1.24% |
Functions | 50 | |
▷ Named functions | 2 | 4.00% |
▷ Anonymous functions | 48 | 96.00% |
Constants | 28 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 28 | 100.00% |
▷ Public constants | 28 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/placements.png | 83.26KB | 32.91KB | ▼ 60.48% |
assets/images/statistics.png | 80.25KB | 31.23KB | ▼ 61.09% |
assets/images/registration.png | 70.69KB | 29.07KB | ▼ 58.88% |