10% gmo-social-connection

Code Review | Plugin Name: GMO Social Connection

WordPress plugin Plugin Name: GMO Social Connectionscored10%from 54 tests.

About plugin

  • Plugin page: gmo-social-connec...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Dec 1, 2014
  • Latest release: Jan 29, 2016
  • Number of updates: 19
  • Update frequency: every 47.3 days
  • Top authors: Takeaki Nagashima (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,046 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/gmo-social-connection/modules/services.php+23
    Methods with the same name as their class will not be constructors in a future version of PHP; GmoSocialConnection has a deprecated constructor

Server metrics [RAM: ▼0.33MB] [CPU: ▼21.76ms] Passed 4 tests

A check of server-side resources used by Plugin Name: GMO Social Connection
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0331.81 ▼14.77
Dashboard /wp-admin3.31 ▼0.0348.18 ▼16.44
Posts /wp-admin/edit.php3.37 ▲0.0151.80 ▼1.14
Add New Post /wp-admin/post-new.php4.61 ▼1.2844.51 ▼54.70
Media Library /wp-admin/upload.php3.24 ▲0.0136.42 ▲3.49
GMO Social Connection /wp-admin/options-general.php?page=gmo-social-connection/modules/admin.php3.1932.54

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 64 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Plugin Name: GMO Social Connection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9414.07 ▼0.2334.69 ▲32.9449.98 ▲6.15
Dashboard /wp-admin2,228 ▲254.86 ▼1.06101.76 ▼16.9338.64 ▼9.19
Posts /wp-admin/edit.php2,104 ▲72.00 ▲0.0139.94 ▲1.0536.01 ▲1.12
Add New Post /wp-admin/post-new.php1,548 ▲1723.26 ▼0.00647.29 ▼30.0157.36 ▲7.45
Media Library /wp-admin/upload.php1,407 ▲44.23 ▼0.00101.50 ▼6.8845.44 ▼4.27
GMO Social Connection /wp-admin/options-general.php?page=gmo-social-connection/modules/admin.php2,0532.0444.4358.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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gmo-social-connection/modules/admin.php
    • > Notice in wp-content/plugins/gmo-social-connection/modules/admin.php+350
    Undefined index: is_home
    • > GET request to /wp-admin/options-general.php?page=gmo-social-connection/modules/admin.php
    • > Notice in wp-content/plugins/gmo-social-connection/modules/admin.php+565
    Undefined index: via
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gmo-social-connection/modules/admin.php
    • > Notice in wp-content/plugins/gmo-social-connection/modules/admin.php+585
    Undefined index: count
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gmo-social-connection/modules/admin.php
    • > Notice in wp-content/plugins/gmo-social-connection/modules/admin.php+644
    Undefined index: fb_root
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gmo-social-connection/modules/admin.php
    • > Notice in wp-content/plugins/gmo-social-connection/modules/admin.php+832
    Undefined index: type
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gmo-social-connection/modules/admin.php
    • > Notice in wp-content/plugins/gmo-social-connection/modules/admin.php+868
    Undefined index: facebook_send
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gmo-social-connection/modules/admin.php
    • > Notice in wp-content/plugins/gmo-social-connection/modules/admin.php+868
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gmo-social-connection/modules/admin.php
    • > Notice in wp-content/plugins/gmo-social-connection/modules/admin.php+1078
    Undefined index: button_size
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gmo-social-connection/modules/admin.php
    • > Notice in wp-content/plugins/gmo-social-connection/modules/admin.php+1150
    Undefined index: annotation
    • > GET request to /wp-admin/options-general.php?page=gmo-social-connection/modules/admin.php
    • > Notice in wp-content/plugins/gmo-social-connection/modules/admin.php+1157
    Undefined index: inline_size

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(WP_PLUGIN_DIR/gmo-social-connection/modules/options.php): failed to open stream: No such file or directory in wp-content/plugins/gmo-social-connection/gmo-social-connection.php on line 26
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gmo-social-connection/gmo-social-connection.php on line 13
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_PLUGIN_DIR/gmo-social-connection/modules/options.php' (include_path='.:/usr/share/php') in wp-content/plugins/gmo-social-connection/gmo-social-connection.php on line 26
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/gmo-social-connection/gmo-social-connection.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === Plugin Name: GMO Social Connection=== )
The official readme.txt is a good inspiration

gmo-social-connection/gmo-social-connection.php Passed 13 tests

Analyzing the main PHP file in "Plugin Name: GMO Social Connection" version 1.2
73 characters long description:
This plugin inserts social share links at the top or bottom of each post.

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
Success! There were no dangerous files found in this plugin2,021 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP52208881,582
CSS23356250
PO File15845138
Sass15042
Ruby16129

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.72
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
40 PNG files occupy 0.27MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/digg.png0.28KB0.28KB0.34%
images/line20x20.png3.10KB2.05KB▼ 33.94%
images/tumblr.png0.60KB0.42KB▼ 30.34%
images/point_left.png0.33KB0.21KB▼ 35.29%
images/gree.png0.27KB0.18KB▼ 34.30%