Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/smartyads/smartyads-widget.php+3
Methods with the same name as their class will not be constructors in a future version of PHP; SmartyAdsWidget has a deprecated constructor
Server metrics [RAM: ▼1.83MB] [CPU: ▼188.77ms] Passed 4 tests
Analyzing server-side resources used by SmartyAds
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.80 ▼1.03 | 6.03 ▼27.33 |
Dashboard /wp-admin | 1.82 ▼1.24 | 6.11 ▼34.97 |
Posts /wp-admin/edit.php | 1.82 ▼1.29 | 6.41 ▼39.55 |
Add New Post /wp-admin/post-new.php | 1.82 ▼3.61 | 6.01 ▼646.38 |
Media Library /wp-admin/upload.php | 1.82 ▼1.19 | 6.35 ▼34.19 |
SmartyAds /wp-admin/options-general.php?page=settings | 1.82 | 6.46 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 2 new options
New WordPress options |
---|
smarty_new_key_valid |
widget_smartyadswidget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for SmartyAds
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,688 ▲92 | 15.91 ▲0.17 | 8.94 ▼1.68 | 45.63 ▲0.94 |
Dashboard /wp-admin | 2,976 ▲45 | 6.06 ▲0.12 | 136.48 ▼7.05 | 107.94 ▲0.34 |
Posts /wp-admin/edit.php | 2,748 ▲9 | 2.71 ▼0.00 | 64.86 ▼0.24 | 84.14 ▼7.16 |
Add New Post /wp-admin/post-new.php | 1,679 ▲64 | 18.92 ▼2.98 | 383.62 ▲122.47 | 106.51 ▼4.06 |
Media Library /wp-admin/upload.php | 1,816 ▲9 | 5.05 ▲0.03 | 155.17 ▲10.99 | 125.28 ▼5.60 |
SmartyAds /wp-admin/options-general.php?page=settings | 1,047 | 2.12 | 50.87 | 74.87 |
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
These items require your attention
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/smartyads/smartyads-widget.php+3
Methods with the same name as their class will not be constructors in a future version of PHP; SmartyAdsWidget has a deprecated constructor
- Zombie WordPress options detected upon uninstall: 2 options
- smarty_new_key_valid
- widget_smartyadswidget
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=settings
- > Deprecated in wp-content/plugins/smartyads/smartyads-widget.php+3
Methods with the same name as their class will not be constructors in a future version of PHP; SmartyAdsWidget has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=settings
- > User deprecated in wp-includes/functions.php+5304
The called constructor method for WP_Widget in SmartyAdsWidget is deprecated since version 4.3.0! Use __construct() instead.
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
- 2× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/smartyads/smartyads.php:13
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/smartyads/smartyads-widget.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: banners, cpm, income, money, monetization...
smartyads/smartyads.php Passed 13 tests
"SmartyAds" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
128 characters long description:
This plugin will automate adding SmartyAds advertisement to your blog posts. SmartyAds will show your blog viewers targeted ads.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin404 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 92 | 12 | 167 |
CSS | 1 | 45 | 12 | 143 |
PO File | 1 | 16 | 16 | 49 |
JavaScript | 1 | 27 | 0 | 45 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 7.00 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 2.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 8 | |
▷ Named functions | 8 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin