83% 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 scored83%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: 6.3.1
  • 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

50+ active /1,876 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Add Google Social Profiles to Knowledge Graph Box
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.42 ▼3.75
Dashboard /wp-admin3.31 ▲0.0147.14 ▼7.65
Posts /wp-admin/edit.php3.36 ▲0.0054.86 ▲6.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.50 ▼11.46
Media Library /wp-admin/upload.php3.23 ▲0.0037.65 ▲2.89

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

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 /2,805 ▲4414.35 ▲0.071.73 ▼0.0638.85 ▼5.37
Dashboard /wp-admin2,214 ▲375.66 ▲0.1386.80 ▼13.2540.31 ▼3.80
Posts /wp-admin/edit.php2,119 ▲162.02 ▲0.0234.41 ▼0.8635.06 ▼2.51
Add New Post /wp-admin/post-new.php1,539 ▲1123.43 ▲0.36644.38 ▼44.0473.04 ▲23.41
Media Library /wp-admin/upload.php1,416 ▲134.20 ▲0.0095.81 ▼14.3743.52 ▼2.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Modified settings panel with Google Social Profiles.), #2 (How Social Profiles look on the search results)
You can look at the official readme.txt

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

"Add Google Social Profiles to Knowledge Graph Box" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin255 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22215255

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues 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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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%