10% sc-google-ranking

Code Review | SC Google Ranking

WordPress plugin SC Google Ranking scored10%from 54 tests.

About plugin

  • Plugin page: sc-google-ranking
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 6.3.1
  • First release: Oct 29, 2014
  • Latest release: Jan 6, 2015
  • Number of updates: 22
  • Update frequency: every 3.1 days
  • Top authors: saucecode (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /2,542 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/sc-google-ranking/ScGoogleRanking_Plugin.php+231
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.83ms] Passed 4 tests

A check of server-side resources used by SC Google Ranking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.57 ▼37.15
Dashboard /wp-admin2.05 ▼1.268.82 ▼39.74
Posts /wp-admin/edit.php2.05 ▼1.316.39 ▼45.40
Add New Post /wp-admin/post-new.php2.05 ▼3.846.43 ▼97.02
Media Library /wp-admin/upload.php2.05 ▼1.185.70 ▼28.51

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
db_upgraded
ScGoogleRanking_Plugin__version
ScGoogleRanking_Plugin_YourKeywords
ScGoogleRanking_Plugin__installed
widget_theysaidso_widget
theysaidso_admin_options
ScGoogleRanking_Plugin_GoogleDomain
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for SC Google Ranking
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.32 ▼1.271.72 ▼0.0143.57 ▲5.48
Dashboard /wp-admin2,224 ▲395.79 ▼0.0796.95 ▼4.5937.73 ▼3.83
Posts /wp-admin/edit.php2,107 ▲182.02 ▲0.0240.02 ▼2.4836.19 ▼5.61
Add New Post /wp-admin/post-new.php1,543 ▲723.35 ▼0.03602.94 ▼13.8359.05 ▲10.35
Media Library /wp-admin/upload.php1,409 ▲184.22 ▼0.0197.26 ▼5.9342.10 ▼2.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 10 options in the database
    • ScGoogleRanking_Plugin__installed
    • ScGoogleRanking_Plugin_YourKeywords
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • ScGoogleRanking_Plugin__version
    • ScGoogleRanking_Plugin_GoogleDomain
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/sc-google-ranking/sc-google-ranking.php:66

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

sc-google-ranking/sc-google-ranking.php Passed 13 tests

The main file in "SC Google Ranking" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
74 characters long description:
Get the ranking of your URL in Google search engine provided with keywords

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected749 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6178461730
CSS12019

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.25
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods65
▷ Static methods00.00%
▷ Public methods3858.46%
▷ Protected methods2741.54%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin