61% wp-seo-keyword-optimizer

Code Review | BAVOKO SEO Tools - All-in-One WordPress SEO

WordPress plugin BAVOKO SEO Tools - All-in-One WordPress SEO scored 61% from 54 tests.

About plugin

  • Plugin page: wp-seo-keyword-op...
  • Plugin version: 2.1.9.12
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2
  • WordPress version: 5.9.2
  • First release: Nov 26, 2016
  • Latest release: Jul 4, 2019
  • Number of updates: 226
  • Update frequency: every 4.2 days
  • Top authors: bavokoservices (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

600+ active / 49,948 total downloads

Benchmarks

Plugin footprint 64% 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: ▲6.92MB] [CPU: ▼262.13ms] 50% from 4 tests

This is a short check of server-side resources used by BAVOKO SEO Tools - All-in-One WordPress SEO
Please have a look at the following items
  • RAM: Total memory usage must be kept under 10MB (currently 10.19MB on /wp-admin/admin.php?page=wsko_iframe)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 6.92MB on /wp-admin/admin.php?page=wsko_iframe)
PageMemory (MB)CPU Time (ms)
Home /10.28 ▲6.7692.36 ▲33.72
Dashboard /wp-admin10.42 ▲7.0174.27 ▲40.88
Posts /wp-admin/edit.php10.65 ▲7.0176.32 ▲39.27
Add New Post /wp-admin/post-new.php13.89 ▲6.91138.00 ▼1,159.36
Media Library /wp-admin/upload.php10.30 ▲7.0065.01 ▲37.84
Safe Download /wp-admin/admin.php?page=wsko_safe_download10.1956.83
Update /wp-admin/admin.php?page=wsko_updated10.1958.33
Freemius Debug [v.2.3.0] /wp-admin/admin.php?page=freemius10.5561.59
Search /wp-admin/admin.php?page=wsko_search10.1963.93
Tools /wp-admin/admin.php?page=wsko_tools10.1956.39
Settings /wp-admin/admin.php?page=wsko_settings10.1956.96
Dashboard /wp-admin/admin.php?page=wsko_dashboard10.1861.94
Onpage /wp-admin/admin.php?page=wsko_onpage10.1957.63
Knowledge Base /wp-admin/admin.php?page=wsko_knowledge10.1956.89
Iframe /wp-admin/admin.php?page=wsko_iframe10.1959.21

Server storage [IO: ▲19.60MB] [DB: ▲0.01MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • Illegal file modification found: 2 files (0.11KB) outside of "wp-content/plugins/wp-seo-keyword-optimizer/" and "wp-content/uploads/"
    • (new file) wp-content/bst/session/global_timespan_.cache
    • (new file) wp-content/bst/.htaccess
Filesystem: 2,132 new files
Database: 5 new tables, 6 new options
New tables
wp_wsko_cache_data_se
wp_wsko_options
wp_wsko_cache_days
wp_wsko_cache_data_onpage
wp_wsko_cache_data_se_d
New WordPress options
fs_accounts
fs_active_plugins
fs_api_cache
wsko_init
fs_debug_mode
fs_gdpr

Browser metrics Passed 4 tests

A check of browser resources used by BAVOKO SEO Tools - All-in-One WordPress SEO
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,863 ▲10916.08 ▼0.306.16 ▼0.802.42 ▼1.34
Dashboard /wp-admin2,971 ▲876.34 ▼0.12128.80 ▼10.26171.40 ▲8.14
Posts /wp-admin/edit.php2,897 ▲2063.45 ▲0.0268.26 ▲6.93219.21 ▲74.55
Add New Post /wp-admin/post-new.php1,721 ▼5219.29 ▼2.17457.70 ▼2.49159.95 ▲4.23
Media Library /wp-admin/upload.php1,764 ▲665.81 ▲0.11149.18 ▲4.84203.63 ▲1.21
Safe Download /wp-admin/admin.php?page=wsko_safe_download2,6819.94175.79155.81
Update /wp-admin/admin.php?page=wsko_updated2,6789.40161.30155.14
Freemius Debug [v.2.3.0] /wp-admin/admin.php?page=freemius1,4782.6956.27130.87
Search /wp-admin/admin.php?page=wsko_search2,6789.43155.83161.62
Tools /wp-admin/admin.php?page=wsko_tools2,6839.35151.64146.04
Settings /wp-admin/admin.php?page=wsko_settings2,6819.41152.47152.86
Dashboard /wp-admin/admin.php?page=wsko_dashboard2,6779.42159.97151.90
Onpage /wp-admin/admin.php?page=wsko_onpage2,6819.44160.04161.35
Knowledge Base /wp-admin/admin.php?page=wsko_knowledge2,6789.43154.73148.86
Iframe /wp-admin/admin.php?page=wsko_iframe2,6819.45151.33167.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall successfully, leaving 5 tables in the database
    • wp_wsko_cache_days
    • wp_wsko_cache_data_se_d
    • wp_wsko_cache_data_se
    • wp_wsko_cache_data_onpage
    • wp_wsko_options
  • Zombie WordPress options were found after uninstall: 6 options
    • fs_accounts
    • fs_active_plugins
    • fs_debug_mode
    • fs_api_cache
    • fs_gdpr
    • wsko_init

Smoke tests 25% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-seo-keyword-optimizer/admin/templates/search/header.php
    • > /wp-content/plugins/wp-seo-keyword-optimizer/admin/templates/tools/notifications.php
    • > /wp-content/plugins/wp-seo-keyword-optimizer/includes/AJAX-Autocomplete-Bootstrap-Select/example/php/ajax.php
    • > /wp-content/plugins/wp-seo-keyword-optimizer/includes/AJAX-Autocomplete-Bootstrap-Select/example/php/index.php
    • > /wp-content/plugins/wp-seo-keyword-optimizer/includes/freemius/templates/ajax-loader.php
    • > /wp-content/plugins/wp-seo-keyword-optimizer/includes/forceutf8/test/ForceUTF8Test.php
  • 512× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/wp-seo-keyword-optimizer/includes/google-api-php-client-2.2.2/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-seo-keyword-optimizer/includes/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/SearchConsole/RunMobileFriendlyTestRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Base' not found in wp-content/plugins/wp-seo-keyword-optimizer/includes/google-api-php-client-2.2.2/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php:64
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service_Resource' not found in wp-content/plugins/wp-seo-keyword-optimizer/includes/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/Analytics/Resource/ManagementAccountSummaries.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-seo-keyword-optimizer/includes/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/AnalyticsReporting/Segment.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Auth\\CredentialsLoader' not found in wp-content/plugins/wp-seo-keyword-optimizer/includes/google-api-php-client-2.2.2/vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/wp-seo-keyword-optimizer/includes/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/Analytics/CustomDataSource.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/wp-seo-keyword-optimizer/includes/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/Analytics/RemarketingAudiences.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-seo-keyword-optimizer/includes/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/Analytics/RemarketingAudienceStateBasedAudienceDefinition.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service_Resource' not found in wp-content/plugins/wp-seo-keyword-optimizer/includes/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/Analytics/Resource/UserDeletionUserDeletionRequest.php:26

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wsko_iframe
    • > Network (severe)
    wp-content/plugins/wp-seo-keyword-optimizer/includes/sigma.js/sigma.min.js?ver=2.1.9.12 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wsko_iframe
    • > Network (severe)
    wp-content/plugins/wp-seo-keyword-optimizer/includes/sigma.js/plugins/sigma.layout.forceAtlas2.min.js?ver=2.1.9.12 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: onpage analysis, seo, google search console, keywords, content optimization

wp-seo-keyword-optimizer/wsko.php 85% from 13 tests

"BAVOKO SEO Tools - All-in-One WordPress SEO" version 2.1.9.12'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:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-seo-keyword-optimizer.php" instead of "wsko.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin211,947 lines of code in 1,327 files:
LanguageFilesBlank linesComment linesLines of code
PHP89720,78955,252128,497
JavaScript2375,3057,90028,160
CSS932,0491,50924,499
PO File115,9737,30713,115
JSON13006,217
Markdown401,67905,659
SVG2002,959
Sass28399772,515
HTML3297292
Handlebars11016
LESS10011
YAML1007

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,609)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 204)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity20.83
▷ Minimum class complexity1.00
▷ Maximum class complexity2,609.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity204.00
Code structure
Namespaces52
Interfaces31
Traits6
Classes730
▷ Abstract classes131.78%
▷ Concrete classes71798.22%
▷ Final classes152.09%
Methods7,038
▷ Static methods76910.93%
▷ Public methods6,20088.09%
▷ Protected methods2483.52%
▷ Private methods5908.38%
Functions496
▷ Named functions17234.68%
▷ Anonymous functions32465.32%
Constants533
▷ Global constants16931.71%
▷ Class constants36468.29%
▷ Public constants364100.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
312 compressed PNG files occupy 0.79MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/famfamfam_flags/lc.png0.51KB0.70KB0.00%
includes/famfamfam_flags/io.png0.64KB0.76KB0.00%
includes/famfamfam_flags/er.png0.64KB0.75KB0.00%
includes/famfamfam_flags/na.png0.63KB0.72KB0.00%
includes/AJAX-Autocomplete-Bootstrap-Select/api-docs/resources/images/icons.png11.66KB3.96KB▼ 66.06%