Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼5.70ms] Passed 4 tests
Analyzing server-side resources used by RandomAd
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.06 | 37.82 ▼2.58 |
Dashboard /wp-admin | 3.41 ▲0.06 | 44.47 ▼16.70 |
Posts /wp-admin/edit.php | 3.52 ▲0.16 | 49.44 ▲4.46 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.10 | 86.07 ▼6.27 |
Media Library /wp-admin/upload.php | 3.33 ▲0.10 | 36.79 ▲2.76 |
RandomAds /wp-admin/admin.php?page=randomads | 3.30 | 32.13 |
広告一覧 /wp-admin/admin.php?page=randomads-ads | 3.30 | 33.69 |
カテゴリー /wp-admin/admin.php?page=randomads-category | 3.27 | 26.55 |
RandomAdsプラグインの管理画面 /wp-admin/options-general.php?page=randomads-config | 3.30 | 30.85 |
広告を追加 /wp-admin/admin.php?page=randomads-add-newad | 3.30 | 29.36 |
Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: 2 new tables, 7 new options
New tables |
---|
wp_randomad_ad |
wp_randomad_cat |
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
widget_widget-template |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for RandomAd
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,835 ▲89 | 13.61 ▼0.82 | 1.75 ▼0.04 | 41.85 ▲2.06 |
Dashboard /wp-admin | 2,238 ▲53 | 5.84 ▼0.03 | 98.09 ▼4.46 | 43.81 ▲2.38 |
Posts /wp-admin/edit.php | 2,121 ▲32 | 2.05 ▼0.01 | 36.29 ▲1.99 | 38.96 ▲5.70 |
Add New Post /wp-admin/post-new.php | 1,564 ▲50 | 23.16 ▲5.67 | 616.91 ▼63.23 | 59.02 ▲2.09 |
Media Library /wp-admin/upload.php | 1,423 ▲41 | 4.26 ▼0.12 | 95.44 ▼3.02 | 46.13 ▲3.71 |
RandomAds /wp-admin/admin.php?page=randomads | 782 | 2.03 | 23.29 | 27.65 |
広告一覧 /wp-admin/admin.php?page=randomads-ads | 852 | 2.03 | 24.47 | 55.97 |
カテゴリー /wp-admin/admin.php?page=randomads-category | 908 | 2.05 | 23.07 | 60.38 |
RandomAdsプラグインの管理画面 /wp-admin/options-general.php?page=randomads-config | 788 | 2.03 | 23.56 | 44.64 |
広告を追加 /wp-admin/admin.php?page=randomads-add-newad | 869 | 2.02 | 22.82 | 47.85 |
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
Please fix the following items
- The uninstall procedure failed, leaving 2 tables in the database
- wp_randomad_ad
- wp_randomad_cat
- This plugin does not fully uninstall, leaving 7 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
- widget_recent-posts
- widget_widget-template
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/admin.php?page=randomads-category
- > Warning in wp-content/plugins/randomad/page.php+190
Use of undefined constant cat_id - assumed 'cat_id' (this will throw an Error in a future version of PHP)
- > GET request to /wp-admin/admin.php?page=randomads-category
- > Notice in wp-content/plugins/randomad/page.php+190
Undefined index: cat_id
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/randomad/TO_RandomAd.php:29
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/randomad/widget.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/randomad/ShortCoad.php:39
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
- Requires at least: Invalid version format
- Screenshots: Please add images for these screenshots: #1 (Ad List on menu.), #2 (Widget of this plugin.), #3 (Widget), #4 (Plugin menu.)
randomad/TO_RandomAd.php 92% from 13 tests
The primary PHP file in "RandomAd" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("randomad.php" instead of "TO_RandomAd.php")
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
Good job! No executable or dangerous file extensions detected788 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 7 | 71 | 70 | 686 |
CSS | 2 | 0 | 0 | 102 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.14 |
Average class complexity | 5.50 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 2.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 8 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 8 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 34 | |
▷ Named functions | 33 | 97.06% |
▷ Anonymous functions | 1 | 2.94% |
Constants | 0 | |
▷ Global constants | 0 | 0.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
4 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-4.png | 2.66KB | 1.90KB | ▼ 28.60% |
screenshot-1.png | 41.59KB | 21.08KB | ▼ 49.31% |
screenshot-3.png | 5.21KB | 2.91KB | ▼ 44.27% |
screenshot-2.png | 11.99KB | 7.13KB | ▼ 40.52% |