Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.11MB] [CPU: ▲0.42ms] Passed 4 tests
This is a short check of server-side resources used by Ad Rakuten
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.59 ▲0.13 | 39.90 ▲0.92 |
Dashboard /wp-admin | 3.41 ▲0.11 | 52.04 ▲5.11 |
Posts /wp-admin/edit.php | 3.53 ▲0.17 | 50.14 ▲3.66 |
Add New Post /wp-admin/post-new.php | 6.00 ▲0.11 | 91.99 ▼5.65 |
Media Library /wp-admin/upload.php | 3.34 ▲0.10 | 35.82 ▲2.76 |
Server storage [IO: ▲0.20MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 80 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for Ad Rakuten
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,934 ▲188 | 13.66 ▼0.88 | 10.38 ▲8.59 | 44.15 ▲5.85 |
Dashboard /wp-admin | 2,228 ▲43 | 5.99 ▲0.17 | 96.92 ▼5.23 | 77.35 ▲30.88 |
Posts /wp-admin/edit.php | 2,110 ▲21 | 1.98 ▼0.08 | 39.73 ▲3.44 | 34.11 ▼2.99 |
Add New Post /wp-admin/post-new.php | 1,691 ▲172 | 23.02 ▼0.17 | 651.52 ▼19.47 | 58.95 ▲10.68 |
Media Library /wp-admin/upload.php | 1,404 ▲19 | 4.22 ▼0.03 | 107.74 ▲0.06 | 74.30 ▲28.83 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
- 4× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/add-rakuten/rakuten-admin-media-modal.php
- > /wp-content/plugins/add-rakuten/rakuten_settings_page.php
- > /wp-content/plugins/add-rakuten/admin-footer-script.php
- > /wp-content/plugins/add-rakuten/ad-rakuten.php
- 47× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'RakutenRws_Api_AppRakutenApi' not found in wp-content/plugins/add-rakuten/sdk/lib/RakutenRws/Api/Definition/TravelHotelDetailSearch.php:18
- > PHP Fatal error
Uncaught Error: Interface 'RakutenRws_Api_ApiInterface' not found in wp-content/plugins/add-rakuten/sdk/lib/RakutenRws/Api/Base.php:18
- > PHP Fatal error
Uncaught Error: Class 'RakutenRws_Api_AppRakutenApi' not found in wp-content/plugins/add-rakuten/sdk/lib/RakutenRws/Api/Definition/BooksSoftwareSearch.php:18
- > PHP Fatal error
Uncaught Error: Class 'RakutenRws_Api_Base' not found in wp-content/plugins/add-rakuten/sdk/lib/RakutenRws/Api/AppRakutenApi.php:18
- > PHP Fatal error
Uncaught Error: Class 'RakutenRws_Api_AppRakutenApi' not found in wp-content/plugins/add-rakuten/sdk/lib/RakutenRws/Api/Definition/RecipeCategoryRanking.php:18
- > PHP Fatal error
Uncaught Error: Class 'RakutenRws_Api_AppRakutenApi' not found in wp-content/plugins/add-rakuten/sdk/lib/RakutenRws/Api/Definition/BooksGenreSearch.php:18
- > PHP Fatal error
Uncaught Error: Class 'RakutenRws_Api_AppRakutenApi' not found in wp-content/plugins/add-rakuten/sdk/lib/RakutenRws/Api/Definition/IchibaItemRanking.php:18
- > PHP Fatal error
Uncaught Error: Class 'RakutenRws_Api_AppRakutenApi' not found in wp-content/plugins/add-rakuten/sdk/lib/RakutenRws/Api/Definition/TravelKeywordHotelSearch.php:18
- > PHP Fatal error
Uncaught Error: Class 'RakutenRws_Api_AppRakutenApi' not found in wp-content/plugins/add-rakuten/sdk/lib/RakutenRws/Api/Definition/IchibaGenreSearch.php:18
- > PHP Fatal error
Uncaught Error: Class 'RakutenRws_Api_AppRakutenApi' not found in wp-content/plugins/add-rakuten/sdk/lib/RakutenRws/Api/Definition/TravelHotelRanking.php:18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: rakuten, webservice, shortcode
add-rakuten/ad-rakuten.php 92% from 13 tests
"Ad Rakuten" version 0.0.11's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("add-rakuten.php" instead of "ad-rakuten.php")
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
There were no executable files found in this plugin3,271 lines of code in 69 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 58 | 636 | 911 | 2,345 |
Markdown | 3 | 151 | 0 | 431 |
JavaScript | 5 | 108 | 128 | 332 |
CSS | 2 | 16 | 3 | 133 |
JSON | 1 | 0 | 0 | 30 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 2.20 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 12.00 |
Average method complexity | 1.42 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 48 | |
▷ Abstract classes | 4 | 8.33% |
▷ Concrete classes | 44 | 91.67% |
▷ Final classes | 0 | 0.00% |
Methods | 153 | |
▷ Static methods | 2 | 1.31% |
▷ Public methods | 145 | 94.77% |
▷ Protected methods | 8 | 5.23% |
▷ Private methods | 0 | 0.00% |
Functions | 19 | |
▷ Named functions | 19 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 3 | 60.00% |
▷ Class constants | 2 | 40.00% |
▷ Public constants | 2 | 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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/rakuten-20x20.png | 1.82KB | 0.81KB | ▼ 55.81% |
assets/img/rakuten-106x106.png | 6.05KB | 3.05KB | ▼ 49.52% |