Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.07MB] [CPU: ▼293.05ms] Passed 4 tests
Server-side resources used by AD Publisher - Automatically insert post ads
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.66 ▲0.15 | 56.33 ▲8.07 |
Dashboard /wp-admin | 3.51 ▲0.10 | 32.08 ▼2.82 |
Posts /wp-admin/edit.php | 3.73 ▲0.09 | 35.51 ▲0.11 |
Add New Post /wp-admin/post-new.php | 6.97 ▼0.00 | 93.31 ▼1,171.18 |
Media Library /wp-admin/upload.php | 3.39 ▲0.10 | 25.97 ▲1.68 |
Settings /wp-admin/edit.php?post_type=adpublisher | 3.49 | 25.21 |
Add New Ad /wp-admin/post-new.php?post_type=adpublisher | 3.72 | 36.59 |
Modules /wp-admin/edit.php?post_type=adpublisher&page=adp_modules | 3.42 | 22.60 |
Server storage [IO: ▲0.43MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
AD Publisher - Automatically insert post ads: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,809 ▲55 | 16.14 ▲0.51 | 6.14 ▲0.43 | 2.11 ▼1.00 |
Dashboard /wp-admin | 2,938 ▲77 | 6.21 ▲0.04 | 113.41 ▼21.20 | 171.03 ▲10.16 |
Posts /wp-admin/edit.php | 2,730 ▲39 | 3.24 ▼0.11 | 62.58 ▼2.13 | 141.02 ▼0.93 |
Add New Post /wp-admin/post-new.php | 1,829 ▲168 | 22.73 ▲6.35 | 451.39 ▲31.40 | 194.03 ▲32.16 |
Media Library /wp-admin/upload.php | 1,744 ▲46 | 5.59 ▲0.07 | 122.50 ▼12.75 | 202.48 ▲17.05 |
Settings /wp-admin/edit.php?post_type=adpublisher | 1,542 | 3.31 | 60.29 | 197.20 |
Add New Ad /wp-admin/post-new.php?post_type=adpublisher | 2,252 | 4.06 | 77.85 | 177.00 |
Modules /wp-admin/edit.php?post_type=adpublisher&page=adp_modules | 1,354 | 2.44 | 56.83 | 183.43 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully
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 | 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 take a closer look at the following
- 7× PHP files trigger server-side errors or warnings when accessed directly:
- > 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: 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_current_screen() in wp-content/plugins/ad-publisher/includes/views/head.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 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 Notice
Undefined variable: post in wp-content/plugins/ad-publisher/includes/views/adp-post-metabox.php on line 4
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/ad-publisher/includes/views/modules.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: ads plugin, adsense injection, ad manager, ads pro, ads...
ad-publisher/ad-publisher.php Passed 13 tests
The main PHP file in "AD Publisher - Automatically insert post ads" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
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 check of programming languages and file extensions; no executable files are allowed
Everything looks great! 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
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.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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
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-4.png | 23.24KB | 4.23KB | ▼ 81.81% |
assets/images/module-1.png | 10.47KB | 4.68KB | ▼ 55.29% |
assets/images/module-2.png | 2.04KB | 1.71KB | ▼ 16.29% |
assets/images/module-3.png | 1.80KB | 2.01KB | 0.00% |