Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.29MB] [CPU: ▼0.78ms] Passed 4 tests
Server-side resources used by SPAI - Similar posts AI Plugin
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.81 ▲0.35 | 45.15 ▲1.95 |
Dashboard /wp-admin | 3.62 ▲0.31 | 55.05 ▼0.55 |
Posts /wp-admin/edit.php | 3.67 ▲0.31 | 51.57 ▲3.86 |
Add New Post /wp-admin/post-new.php | 6.15 ▲0.27 | 93.06 ▼3.18 |
Media Library /wp-admin/upload.php | 3.48 ▲0.25 | 37.34 ▼1.35 |
Similar Posts AI /wp-admin/options-general.php?page=spai | 3.47 | 354.31 |
Server storage [IO: ▲0.56MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 61 new files
Database: 1 new table, 8 new options
New tables |
---|
wp_spai_posts_data_sync |
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
widget_spai_widget |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
spai_table_posts_data_sync_version |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for SPAI - Similar posts AI Plugin
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,928 ▲167 | 14.04 ▼0.31 | 7.93 ▲5.79 | 40.57 ▼2.67 |
Dashboard /wp-admin | 2,215 ▲35 | 5.42 ▼0.23 | 91.81 ▼8.00 | 42.08 ▼2.69 |
Posts /wp-admin/edit.php | 2,123 ▲23 | 2.38 ▲0.38 | 42.29 ▲4.96 | 35.15 ▼2.25 |
Add New Post /wp-admin/post-new.php | 1,547 ▲10 | 23.39 ▲5.25 | 643.16 ▲13.98 | 38.02 ▼23.71 |
Media Library /wp-admin/upload.php | 1,423 ▲23 | 4.90 ▲0.70 | 101.16 ▼2.95 | 41.68 ▼5.03 |
Similar Posts AI /wp-admin/options-general.php?page=spai | 852 | 2.30 | 30.12 | 22.34 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- Zombie WordPress options detected upon uninstall: 8 options
- can_compress_scripts
- spai_table_posts_data_sync_version
- widget_spai_widget
- widget_theysaidso_widget
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested
SRP 0% 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 fix the following
- 3× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/similar-posts-ai-spai/public/partials/spai-public-display.php
- > /wp-content/plugins/similar-posts-ai-spai/admin/partials/tab-content/spai-tab-contact.php
- > /wp-content/plugins/similar-posts-ai-spai/admin/partials/tab-content/spai-tab-statistic.php
- 29× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Notice
Undefined variable: api_key in wp-content/plugins/similar-posts-ai-spai/admin/partials/tab-content/spai-tab-monetization.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/similar-posts-ai-spai/admin/partials/spai-admin-display.php:20
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/similar-posts-ai-spai/includes/class-spai-widget-form.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/similar-posts-ai-spai/includes/widget-templates/template4.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/similar-posts-ai-spai/admin/partials/spai-admin-setup.php:20
- > PHP Notice
Undefined variable: clicksStat in wp-content/plugins/similar-posts-ai-spai/admin/partials/tab-content/spai-tab-statistic.php on line 11
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/similar-posts-ai-spai/admin/partials/tab-content/spai-tab-monetization.php:10
- > PHP Warning
array_walk() expects parameter 1 to be array, null given in wp-content/plugins/similar-posts-ai-spai/admin/partials/tab-content/spai-tab-statistic.php on line 9
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/similar-posts-ai-spai/admin/partials/tab-content/spai-tab-statistic.php on line 5
- > PHP Warning
Use of undefined constant __SPAI_SITE__ - assumed '__SPAI_SITE__' (this will throw an Error in a future version of PHP) in wp-content/plugins/similar-posts-ai-spai/admin/partials/tab-content/spai-tab-monetization.php on line 4
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: Please describe screenshot #9 in similar-posts-ai-spai/assets to your readme.txt
similar-posts-ai-spai/spai.php 85% from 13 tests
The main PHP script in "SPAI - Similar posts AI Plugin" version 1.8.0 is automatically included on every request by WordPress
You should first fix the following items:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Main file name: It is recommended to name the main PHP file as the plugin slug ("similar-posts-ai-spai.php" instead of "spai.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected5,018 lines of code in 50 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 36 | 645 | 1,613 | 3,014 |
CSS | 4 | 177 | 10 | 925 |
JavaScript | 8 | 219 | 228 | 891 |
PO File | 2 | 74 | 6 | 188 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 17.91 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 139.00 |
Average method complexity | 3.26 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 78.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 23 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 23 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 172 | |
▷ Static methods | 18 | 10.47% |
▷ Public methods | 121 | 70.35% |
▷ Protected methods | 17 | 9.88% |
▷ Private methods | 34 | 19.77% |
Functions | 7 | |
▷ Named functions | 5 | 71.43% |
▷ Anonymous functions | 2 | 28.57% |
Constants | 24 | |
▷ Global constants | 6 | 25.00% |
▷ Class constants | 18 | 75.00% |
▷ Public constants | 18 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/img/default-picture.png | 7.65KB | 2.94KB | ▼ 61.57% |