10% ab-rankings-testing-tool

Code Review | SEO Scout: Content Optimization, Keyword Research, Rank Tracking + SEO Testing

WordPress plugin SEO Scout: Content Optimization, Keyword Research, Rank Tracking + SEO Testing scored 10% from 53 tests.

About plugin

  • Plugin page: ab-rankings-testi...
  • Plugin version: 0.9.83
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 5.8.1
  • First release: Aug 16, 2018
  • Latest release: Jul 19, 2021
  • Number of updates: 17
  • Update frequency: every 62.9 days
  • Top authors: nomadicmedia (100%)

Code review

53 tests

User reviews

1 review

Install metrics

80+ active / 2,081 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/ab-rankings-testing-tool/abrankings.php+22
    Undefined index: abrankings

Server metrics [RAM: ▼1.69MB] [CPU: ▼310.92ms] Passed 4 tests

This is a short check of server-side resources used by SEO Scout: Content Optimization, Keyword Research, Rank Tracking + SEO Testing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.94 ▼0.897.17 ▼23.07
Dashboard /wp-admin1.96 ▼1.107.33 ▼34.50
Posts /wp-admin/edit.php1.96 ▼1.156.02 ▼35.08
Add New Post /wp-admin/post-new.php1.96 ▼3.475.98 ▼1,140.24
Media Library /wp-admin/upload.php1.96 ▼1.055.58 ▼33.84
A/B Rankings /wp-admin/options-general.php?page=abrankings1.966.71

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 22 new files
Database: 2 new tables, 1 new option
New tables
wp_abr_tests
wp_abr_test_urls
New WordPress options
abr_last_updated

Browser metrics Passed 4 tests

A check of browser resources used by SEO Scout: Content Optimization, Keyword Research, Rank Tracking + SEO Testing
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,700 ▲9415.81 ▲0.338.47 ▼1.0845.95 ▼2.98
Dashboard /wp-admin2,957 ▲1076.05 ▲0.21140.24 ▼1.76101.92 ▼3.35
Posts /wp-admin/edit.php2,733 ▲272.70 ▲0.0165.37 ▼2.8691.29 ▼0.63
Add New Post /wp-admin/post-new.php1,709 ▲5316.96 ▼0.99400.38 ▼2.95121.93 ▲10.42
Media Library /wp-admin/upload.php1,802 ▲305.03 ▲0.01154.73 ▲7.85111.56 ▼20.36
A/B Rankings /wp-admin/options-general.php?page=abrankings2,17721.12400.86155.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/ab-rankings-testing-tool/abrankings.php+22
    Undefined index: abrankings
  • The uninstall procedure has failed, leaving 1 option in the database
    • abr_last_updated

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=abrankings
    • > Notice in wp-content/plugins/ab-rankings-testing-tool/abrankings.php+22
    Undefined index: abrankings
    • > GET request to /wp-admin/options-general.php?page=abrankings
    • > User notice in wp-includes/functions.php+5663
    wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/options-general.php?page=abrankings
    • > Notice in wp-content/plugins/ab-rankings-testing-tool/abrankings.php+478
    Undefined index: action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=abrankings
    • > Notice in wp-content/plugins/ab-rankings-testing-tool/abrankings.php+564
    Undefined variable: _SESSION
    • > GET request to /wp-admin/options-general.php?page=abrankings
    • > Notice in wp-content/plugins/ab-rankings-testing-tool/abrankings.php+561
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=abrankings
    • > Notice in wp-content/plugins/ab-rankings-testing-tool/abrankings.php+504
    Undefined variable: sites
    • > GET request to /wp-admin/options-general.php?page=abrankings
    • > Notice in wp-content/plugins/ab-rankings-testing-tool/abrankings.php+506
    Undefined variable: option_group
    • > GET request to /wp-admin/options-general.php?page=abrankings
    • > Notice in wp-content/plugins/ab-rankings-testing-tool/abrankings.php+507
    Undefined variable: selected
    • > GET request to /wp-admin/options-general.php?page=abrankings
    • > Notice in wp-content/plugins/ab-rankings-testing-tool/abrankings.php+295
    ob_end_clean(): failed to delete buffer. No buffer to delete

SRP 50% 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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in /var/www/wordpress/wp-content/plugins/ab-rankings-testing-tool/metabox.inc:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt is a good inspiration

ab-rankings-testing-tool/abrankings.php 92% from 13 tests

"SEO Scout: Content Optimization, Keyword Research, Rank Tracking + SEO Testing" version 0.9.83's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ab-rankings-testing-tool.php" instead of "abrankings.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
Everything looks great! No dangerous files found in this plugin1,178 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP2142103704
SVG1400398
CSS12056
Pascal1184515
JavaScript1005

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods320.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions2086.96%
▷ Anonymous functions313.04%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/seoscout-logo.png9.69KB4.31KB▼ 55.50%