67% wcc-seo-keyword-research

Code Review | WCC SEO Keyword Research

WordPress plugin WCC SEO Keyword Research scored 67% from 54 tests.

About plugin

  • Plugin page: wcc-seo-keyword-r...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.7
  • WordPress version: 5.9.2
  • First release: Jun 17, 2021
  • Latest release: Jun 17, 2021
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: weconnectcode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 121 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.76MB] [CPU: ▼323.89ms] 75% from 4 tests

Analyzing server-side resources used by WCC SEO Keyword Research
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 911.63ms on /wp-admin/admin.php?page=wcc-seo-keyword-research)
PageMemory (MB)CPU Time (ms)
Home /8.66 ▲5.1575.52 ▲20.26
Dashboard /wp-admin8.68 ▲5.2758.90 ▼1.48
Posts /wp-admin/edit.php8.68 ▲5.0457.35 ▲19.62
Add New Post /wp-admin/post-new.php10.55 ▲3.58115.38 ▼1,333.96
Media Library /wp-admin/upload.php8.68 ▲5.3952.68 ▲27.72
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius8.6846.86
WCC SEO Keyword Research /wp-admin/admin.php?page=wcc-seo-keyword-research8.68911.63

Server storage [IO: ▲4.31MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 263 new files
Database: no new tables, 5 new options
New WordPress options
fs_accounts
fs_debug_mode
fs_gdpr
fs_active_plugins
wcc_seo_keyword_research_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for WCC SEO Keyword Research
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,814 ▲7015.71 ▼0.315.55 ▼1.192.21 ▲0.05
Dashboard /wp-admin2,943 ▲896.12 ▲0.01117.20 ▼18.49374.71 ▲214.37
Posts /wp-admin/edit.php2,737 ▲493.24 ▲0.0165.55 ▼32.45217.12 ▲54.35
Add New Post /wp-admin/post-new.php1,682 ▲2121.89 ▲4.30441.71 ▲29.86168.33 ▼49.99
Media Library /wp-admin/upload.php1,746 ▲545.65 ▲0.12148.27 ▲3.23212.63 ▲30.07
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius1,4732.5451.32112.99
WCC SEO Keyword Research /wp-admin/admin.php?page=wcc-seo-keyword-research1,6834.2687.31278.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wcc-seo-keyword-research/freemius/includes/class-freemius.php+8552
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 5 options in the database
    • fs_accounts
    • fs_debug_mode
    • fs_active_plugins
    • wcc_seo_keyword_research_db_version
    • fs_gdpr

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wcc-seo-keyword-research/freemius/templates/ajax-loader.php
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wcc-seo-keyword-research/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/wcc-seo-keyword-research/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/wcc-seo-keyword-research/freemius/templates/partials/network-activation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wcc-seo-keyword-research/includes/getApiKey.php:19
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/wcc-seo-keyword-research/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wcc-seo-keyword-research/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wcc-seo-keyword-research/includes/setting.php:41
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/wcc-seo-keyword-research/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/wcc-seo-keyword-research/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wcc-seo-keyword-research/includes/wcc_keyword_research-xls-export.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: seo keyword research

wcc-seo-keyword-research/wcc_seo_keyword_research.php 92% from 13 tests

The primary PHP file in "WCC SEO Keyword Research" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wcc-seo-keyword-research.php" instead of "wcc_seo_keyword_research.php")

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected35,638 lines of code in 160 files:
LanguageFilesBlank linesComment linesLines of code
PHP1148,05216,12832,050
CSS171,739271,400
JavaScript81462021,195
SVG1909752
Markdown1680214
JSON10027

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,907)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity90.91
▷ Minimum class complexity1.00
▷ Maximum class complexity2,907.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes24.26%
▷ Concrete classes4595.74%
▷ Final classes00.00%
Methods1,182
▷ Static methods18415.57%
▷ Public methods82469.71%
▷ Protected methods292.45%
▷ Private methods32927.83%
Functions108
▷ Named functions10799.07%
▷ Anonymous functions10.93%
Constants127
▷ Global constants10078.74%
▷ Class constants2721.26%
▷ Public constants27100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
17 PNG files occupy 0.36MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/tool/excel.png34.92KB12.95KB▼ 62.93%
(invalid) img/placeholder-2.png37.42KB0.00KB▼ 100.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
img/zillow-Logo.png1.56KB1.19KB▼ 23.34%
img/tool/xls.png59.46KB22.20KB▼ 62.66%