62% rank-my-wp

Code Review | Rank My WP - Keyword Research & Ranking

WordPress plugin Rank My WP - Keyword Research & Ranking scored62%from 54 tests.

About plugin

  • Plugin page: rank-my-wp
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.2
  • WordPress version: 6.3.1
  • First release: Feb 4, 2021
  • Latest release: May 4, 2023
  • Number of updates: 38
  • Update frequency: every 21.6 days
  • Top authors: cifi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

6,000+ active /104,222 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.70MB] [CPU: ▲3.36ms] 75% from 4 tests

A check of server-side resources used by Rank My WP - Keyword Research & Ranking
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 645.10ms on /wp-admin/admin.php?page=rkmw_dashboard)
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3341.49 ▲0.37
Dashboard /wp-admin4.14 ▲0.8350.87 ▼1.68
Posts /wp-admin/edit.php4.18 ▲0.8257.10 ▲8.60
Add New Post /wp-admin/post-new.php6.72 ▲0.8398.38 ▲6.15
Media Library /wp-admin/upload.php4.05 ▲0.8342.33 ▲9.14
Google Rankings /wp-admin/admin.php?page=rkmw_rankings3.8132.38
Keyword Research /wp-admin/admin.php?page=rkmw_research3.8133.94
Go To RMW Cloud /wp-admin/admin.php?page=rkmw_cloud3.8233.12
First Step /wp-admin/admin.php?page=rkmw_dashboard4.15645.10
Keywords Briefcase /wp-admin/admin.php?page=rkmw_research/briefcase3.8131.06
Help & Support /wp-admin/admin.php?page=rkmw_help3.8130.98
Keywords Suggestion /wp-admin/admin.php?page=rkmw_research/suggested3.8131.26
Sync Keywords /wp-admin/admin.php?page=rkmw_rankings/gscsync3.8131.62

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 168 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
rkmw_options
can_compress_scripts

Browser metrics Passed 4 tests

Rank My WP - Keyword Research & Ranking: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲19013.14 ▼1.614.54 ▲2.5139.19 ▼9.42
Dashboard /wp-admin2,307 ▲1224.86 ▼0.9699.95 ▼5.6769.61 ▲28.45
Posts /wp-admin/edit.php2,193 ▲1012.00 ▲0.0039.29 ▲0.7836.18 ▲2.78
Add New Post /wp-admin/post-new.php1,604 ▲7123.21 ▼0.05716.74 ▲119.5553.34 ▲3.86
Media Library /wp-admin/upload.php1,480 ▲894.23 ▲0.0099.40 ▼0.4962.98 ▲20.27
Google Rankings /wp-admin/admin.php?page=rkmw_rankings1,2413.7852.4570.91
Keyword Research /wp-admin/admin.php?page=rkmw_research1,2413.8649.2339.10
Go To RMW Cloud /wp-admin/admin.php?page=rkmw_cloud3667.4467.8418.11
First Step /wp-admin/admin.php?page=rkmw_dashboard1,3373.6944.9366.91
Keywords Briefcase /wp-admin/admin.php?page=rkmw_research/briefcase1,1953.7644.7538.78
Help & Support /wp-admin/admin.php?page=rkmw_help7873.2181.2356.51
Keywords Suggestion /wp-admin/admin.php?page=rkmw_research/suggested1,3343.5946.1460.66
Sync Keywords /wp-admin/admin.php?page=rkmw_rankings/gscsync1,3963.7044.2068.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/rank-my-wp/config/config.php+16
    Constant RKMW_REQUEST_TIME already defined
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 21× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/rank-my-wp/controllers/Menu.php
    • > /wp-content/plugins/rank-my-wp/controllers/Overview.php
    • > /wp-content/plugins/rank-my-wp/core/BlockFeatures.php
    • > /wp-content/plugins/rank-my-wp/controllers/Uninstall.php
    • > /wp-content/plugins/rank-my-wp/core/BlockStats.php
    • > /wp-content/plugins/rank-my-wp/core/BlockLogin.php
    • > /wp-content/plugins/rank-my-wp/index.php
    • > /wp-content/plugins/rank-my-wp/controllers/Ranking.php
    • > /wp-content/plugins/rank-my-wp/core/BlockSearch.php
    • > /wp-content/plugins/rank-my-wp/classes/FrontController.php
  • 27× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RKMW_Classes_ObjController' not found in wp-content/plugins/rank-my-wp/view/Research/Research.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/rank-my-wp/view/Connect/GoogleSearchConsole.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'RKMW_Classes_ObjController' not found in wp-content/plugins/rank-my-wp/view/Research/History.php:2
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/rank-my-wp/view/Notices.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'RKMW_Classes_ObjController' not found in wp-content/plugins/rank-my-wp/view/Help.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'RKMW_Classes_ObjController' not found in wp-content/plugins/rank-my-wp/view/Research/Labels.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'RKMW_Classes_ObjController' not found in wp-content/plugins/rank-my-wp/view/Rankings/Settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'RKMW_Classes_ObjController' not found in wp-content/plugins/rank-my-wp/view/Research/Briefcase.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'RKMW_Classes_ObjController' not found in wp-content/plugins/rank-my-wp/view/Blocks/Toolbar.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'RKMW_Classes_ObjController' not found in wp-content/plugins/rank-my-wp/view/Errors/Inactive.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=rkmw_cloud
    • > Javascript (severe) in unknown
    https://cloud.rankmywp.com/lib/js/dist/hooks.min.jsd3cf8e8d95a3d6d5 0:0 Uncaught SyntaxError: Unexpected token '
    • > GET request to /wp-admin/admin.php?page=rkmw_cloud
    • > Javascript (severe) in unknown
    https://cloud.rankmywp.com/lib/js/dist/i18n.min.jse794f35a71bb98672ae 0:0 Uncaught SyntaxError: Unexpected token '
    • > GET request to /wp-admin/admin.php?page=rkmw_cloud
    • > Javascript (severe) in unknown
    https://cloud.rankmywp.com/login 271:0 Uncaught ReferenceError: wp is not defined
    • > GET request to /wp-admin/admin.php?page=rkmw_cloud
    • > Javascript (severe) in unknown
    https://cloud.rankmywp.com/user/js/password-strength-meter.min.js 1:50 Uncaught TypeError: Cannot read properties of undefined (reading '__')
    • > GET request to /wp-admin/admin.php?page=rkmw_cloud
    • > Javascript (severe) in unknown
    https://cloud.rankmywp.com/user/js/user-profile.min.js 1:52 Uncaught TypeError: Cannot read properties of undefined (reading '__')

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
7 plugin tags: keyword research, seo, research, gsc, ranking...

rank-my-wp/index.php 92% from 13 tests

This is the main PHP file of "Rank My WP - Keyword Research & Ranking" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("rank-my-wp.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin9,506 lines of code in 100 files:
LanguageFilesBlank linesComment linesLines of code
PHP611,1881,1446,356
SVG4003,013
JSON100102
CSS210622
JavaScript130013

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 112)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity23.94
▷ Minimum class complexity1.00
▷ Maximum class complexity133.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity112.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes31
▷ Abstract classes13.23%
▷ Concrete classes3096.77%
▷ Final classes00.00%
Methods209
▷ Static methods8440.19%
▷ Public methods19593.30%
▷ Protected methods83.83%
▷ Private methods62.87%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants33
▷ Global constants33100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
46 PNG files occupy 0.25MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
view/assets/img/logos/kr_92.png2.69KB1.81KB▼ 32.85%
view/assets/img/logos/sitemap_92.png2.68KB1.75KB▼ 34.67%
view/assets/img/flags.png17.95KB18.89KB0.00%
view/assets/img/logos/authority_92.png3.22KB1.96KB▼ 39.37%
view/assets/img/settings/kr_multiple.png9.82KB4.97KB▼ 49.38%