78% simple-ga-ranking

Code Review | Simple GA Ranking

WordPress plugin Simple GA Ranking scored78%from 54 tests.

About plugin

  • Plugin page: simple-ga-ranking
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-5.9.3
  • WordPress version: 6.3.1
  • First release: Feb 21, 2013
  • Latest release: May 19, 2022
  • Number of updates: 95
  • Update frequency: every 35.5 days
  • Top authors: horike (84.21%)wokamoto (16.84%)

Code review

54 tests

User reviews

7 reviews

Install metrics

2,000+ active /78,235 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.25MB] [CPU: ▼3.27ms] Passed 4 tests

This is a short check of server-side resources used by Simple GA Ranking
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2242.73 ▼1.96
Dashboard /wp-admin3.60 ▲0.3049.91 ▼5.66
Posts /wp-admin/edit.php3.65 ▲0.3054.39 ▲5.61
Add New Post /wp-admin/post-new.php6.12 ▲0.2491.91 ▼9.04
Media Library /wp-admin/upload.php3.46 ▲0.2440.83 ▲3.57
Simple GA Ranking /wp-admin/options-general.php?page=sga_ranking3.4335.23
Analytics設定 /wp-admin/options-general.php?page=gapiwp-analytics3.4435.84

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 248 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Simple GA Ranking
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.31 ▼0.951.78 ▼0.2244.12 ▲1.19
Dashboard /wp-admin2,216 ▲285.79 ▼0.09100.49 ▼10.6048.39 ▲4.98
Posts /wp-admin/edit.php2,101 ▲122.04 ▲0.0535.19 ▼1.8041.71 ▲6.28
Add New Post /wp-admin/post-new.php1,528 ▼017.65 ▼0.74687.26 ▲43.7757.39 ▲3.17
Media Library /wp-admin/upload.php1,404 ▲224.29 ▲0.0699.53 ▼11.5543.94 ▼1.20
Simple GA Ranking /wp-admin/options-general.php?page=sga_ranking8092.0626.4933.77
Analytics設定 /wp-admin/options-general.php?page=gapiwp-analytics8412.0526.9369.14

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_simple_ga_rankig
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 10× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/examples/simplefileupload.php
    • > /wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/examples/multi-api.php
    • > /wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/examples/service-account.php
    • > /wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/examples/user-example.php
    • > /wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/examples/simple-query.php
    • > /wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/examples/idtoken.php
    • > /wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/examples/batch.php
    • > /wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/examples/fileupload.php
    • > /wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/examples/index.php
    • > /wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/tests/OAuthHelper.php
  • 136× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/src/Google/Service/Deploymentmanager.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'BaseTest' not found in wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/tests/adsense/AdSenseTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/src/Google/Service/AdExchangeSeller.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'BaseTest' not found in wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/tests/plus/PlusTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/src/Google/Service/Dataproc.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/src/Google/Service/Prediction.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/src/Google/Service/AndroidEnterprise.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/src/Google/Service/Audit.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/src/Google/Service/AdSense.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'BaseTest' not found in wp-content/plugins/simple-ga-ranking/vendor/google/apiclient/tests/general/ApiModelTest.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: google analytics, popular, form, ranking

simple-ga-ranking/simple-ga-ranking.php 92% from 13 tests

Analyzing the main PHP file in "Simple GA Ranking" version 3.0.0
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected213,818 lines of code in 231 files:
LanguageFilesBlank linesComment linesLines of code
PO File220062

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.02
Average class complexity1.21
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity1.03
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
▷ Abstract classes70.18%
▷ Concrete classes3,88699.82%
▷ Final classes00.00%
▷ Static methods350.12%
▷ Public methods30,22699.66%
▷ Protected methods340.11%
▷ Private methods680.22%
▷ Named functions2452.17%
▷ Anonymous functions2247.83%
▷ Global constants41.15%
▷ Class constants34598.85%
▷ Public constants345100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected