93% add-google-social-profiles-to-knowledge-graph-box

Code Review | Add Google Social Profiles to Knowledge Graph Box

WordPress plugin Add Google Social Profiles to Knowledge Graph Box scored 93% from 54 tests.

About plugin

  • Plugin page: add-google-social...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.3
  • WordPress version: 5.9.2
  • First release: Jan 21, 2015
  • Latest release: Nov 11, 2015
  • Number of updates: 5
  • Update frequency: every 58.8 days
  • Top authors: omarnas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 1,608 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼291.36ms] Passed 4 tests

Server-side resources used by Add Google Social Profiles to Knowledge Graph Box
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0252.71 ▲2.55
Dashboard /wp-admin3.43 ▲0.0232.05 ▼1.10
Posts /wp-admin/edit.php3.66 ▲0.0236.35 ▲1.50
Add New Post /wp-admin/post-new.php6.90 ▼0.0890.95 ▼1,166.11
Media Library /wp-admin/upload.php3.31 ▲0.0123.63 ▲0.28

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Add Google Social Profiles to Knowledge Graph Box
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲2915.98 ▲0.335.64 ▼0.392.20 ▼0.72
Dashboard /wp-admin2,912 ▲586.11 ▼0.11114.38 ▼16.95152.81 ▼4.95
Posts /wp-admin/edit.php2,711 ▲173.24 ▲0.0261.64 ▼0.05135.63 ▼4.67
Add New Post /wp-admin/post-new.php1,674 ▲1315.79 ▼0.25409.59 ▼17.14153.19 ▼4.87
Media Library /wp-admin/upload.php1,721 ▲235.51 ▲0.01139.71 ▲7.39186.56 ▼1.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-google-social-profiles-to-knowledge-graph-box/google-social-profiles.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/add-google-social-profiles-to-knowledge-graph-box/gsp-options.php:2

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Modified settings panel with Google Social Profiles.), #2 (How Social Profiles look on the search results)
The official readme.txt might help

add-google-social-profiles-to-knowledge-graph-box/google-social-profiles.php 92% from 13 tests

The principal PHP file in "Add Google Social Profiles to Knowledge Graph Box" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("add-google-social-profiles-to-knowledge-graph-box.php" instead of "google-social-profiles.php")

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
There were no executable files found in this plugin255 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 1.01MB with 0.64MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png68.75KB22.25KB▼ 67.63%
screenshot-2.png962.74KB391.81KB▼ 59.30%