Benchmarks
Plugin footprint 83% from 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.17MB] [CPU: ▼5.15ms] Passed 4 tests
This is a short check of server-side resources used by AD Publisher - Automatically insert post ads
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.63 ▲0.17 | 42.98 ▲1.25 |
Dashboard /wp-admin | 3.47 ▲0.17 | 48.53 ▼3.89 |
Posts /wp-admin/edit.php | 3.59 ▲0.23 | 45.19 ▼5.50 |
Add New Post /wp-admin/post-new.php | 6.05 ▲0.17 | 85.09 ▼12.44 |
Media Library /wp-admin/upload.php | 3.40 ▲0.17 | 39.29 ▲7.69 |
Add New Ad /wp-admin/post-new.php?post_type=adpublisher | 3.47 | 42.97 |
Modules /wp-admin/edit.php?post_type=adpublisher&page=adp_modules | 3.38 | 33.11 |
Settings /wp-admin/edit.php?post_type=adpublisher | 3.44 | 39.07 |
Server storage [IO: ▲0.43MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for AD Publisher - Automatically insert post ads
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,851 ▲90 | 14.35 ▼0.31 | 1.95 ▲0.41 | 44.13 ▲7.71 |
Dashboard /wp-admin | 2,226 ▲52 | 5.52 ▼0.06 | 81.91 ▼6.09 | 61.79 ▲18.70 |
Posts /wp-admin/edit.php | 2,117 ▲17 | 1.99 ▼0.04 | 38.07 ▲3.11 | 32.97 ▼6.17 |
Add New Post /wp-admin/post-new.php | 6,427 ▲4,901 | 27.51 ▲4.53 | 981.47 ▲321.49 | 59.72 ▼0.51 |
Media Library /wp-admin/upload.php | 1,437 ▲40 | 4.15 ▼0.01 | 98.34 ▼6.48 | 64.83 ▲19.31 |
Add New Ad /wp-admin/post-new.php?post_type=adpublisher | 1,677 | 2.52 | 46.59 | 49.45 |
Modules /wp-admin/edit.php?post_type=adpublisher&page=adp_modules | 1,036 | 1.82 | 24.44 | 49.96 |
Settings /wp-admin/edit.php?post_type=adpublisher | 1,190 | 2.05 | 34.42 | 40.34 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 7× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/ad-publisher/includes/views/modules.php:2
- > PHP Notice
Undefined variable: post in wp-content/plugins/ad-publisher/includes/views/adp-post-metabox.php on line 4
- > PHP Notice
Trying to get property 'ID' of non-object in wp-content/plugins/ad-publisher/includes/views/adp-post-metabox.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function get_current_screen() in wp-content/plugins/ad-publisher/includes/views/settings.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_current_screen() in wp-content/plugins/ad-publisher/includes/views/head.php:2
- > PHP Fatal error
Uncaught Error: Class 'WP_Upgrader_Skin' not found in wp-content/plugins/ad-publisher/includes/classes/class-upgrader-skin.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/ad-publisher/includes/views/adp-post-metabox.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 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
8 plugin tags: ad injection, adsense, ad manager, adsense injection, ads...
ad-publisher/ad-publisher.php Passed 13 tests
"AD Publisher - Automatically insert post ads" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
45 characters long description:
Plugin for automatic insertion of the ad code
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,319 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 323 | 833 | 1,356 |
CSS | 2 | 103 | 22 | 562 |
PO File | 2 | 121 | 130 | 343 |
JavaScript | 1 | 7 | 1 | 58 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.55 |
Average class complexity | 28.86 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 134.00 |
Average method complexity | 3.79 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 77.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 1 | 14.29% |
Methods | 70 | |
▷ Static methods | 10 | 14.29% |
▷ Public methods | 63 | 90.00% |
▷ Protected methods | 5 | 7.14% |
▷ Private methods | 2 | 2.86% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 11 | |
▷ Global constants | 2 | 18.18% |
▷ Class constants | 9 | 81.82% |
▷ Public constants | 9 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/icon.png | 18.55KB | 0.71KB | ▼ 96.18% |
assets/images/module-1.png | 10.47KB | 4.68KB | ▼ 55.29% |
assets/images/module-4.png | 23.24KB | 4.23KB | ▼ 81.81% |
assets/images/module-2.png | 2.04KB | 1.71KB | ▼ 16.29% |
assets/images/module-3.png | 1.80KB | 2.01KB | 0.00% |