10% google-rank-badge

Code Review | Google Rank Badge

WordPress plugin Google Rank Badge scored10%from 54 tests.

About plugin

  • Plugin page: google-rank-badge
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.4.1
  • WordPress version: 6.3.1
  • First release: Jun 24, 2012
  • Latest release: Jun 28, 2012
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: nickpowers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,418 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/google-rank-badge/grank.php+123
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.15ms] Passed 4 tests

A check of server-side resources used by Google Rank Badge
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.63 ▼0.99
Dashboard /wp-admin3.31 ▼0.0343.21 ▼18.47
Posts /wp-admin/edit.php3.36 ▲0.0147.21 ▲2.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.18 ▼7.62
Media Library /wp-admin/upload.php3.24 ▲0.0134.52 ▲2.67

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Google Rank Badge
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2114.35 ▼0.401.48 ▼0.2537.47 ▼5.77
Dashboard /wp-admin2,196 ▲195.52 ▼0.1681.74 ▼6.7237.23 ▼4.76
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0039.29 ▲3.2034.87 ▼2.48
Add New Post /wp-admin/post-new.php1,529 ▲323.50 ▼0.06691.36 ▲3.2653.44 ▲2.11
Media Library /wp-admin/upload.php1,401 ▼24.22 ▲0.1398.17 ▼1.3641.98 ▼0.02
Google Rank Badge /wp-admin/grank.php260.420.0813.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/google-rank-badge/grank.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/grank.php
    • > Network (severe)
    wp-admin/grank.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Google Rank Badge in Action!), #2 (Google Rank Admin Settings)
The official readme.txt might help

google-rank-badge/grank.php 92% from 13 tests

Analyzing the main PHP file in "Google Rank Badge" version 1.0
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("google-rank-badge.php" instead of "grank.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected160 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18129160

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity10.00
▷ Minimum class complexity8.00
▷ Maximum class complexity12.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png50.28KB13.09KB▼ 73.97%
screenshot-1.png6.05KB3.29KB▼ 45.62%
images/pagerank_transparent.png0.45KB0.25KB▼ 44.35%
images/pagerank_blank.png0.36KB0.22KB▼ 39.95%