68% google-plus-share-and-plusone-button

Code Review | Google Plus Share and +1 Button

WordPress plugin Google Plus Share and +1 Button scored68%from 54 tests.

About plugin

  • Plugin page: google-plus-share...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 19, 2013
  • Latest release: Dec 17, 2013
  • Number of updates: 11
  • Update frequency: every 8.1 days
  • Top authors: acbaltaci (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,639 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.95MB] [CPU: ▼32.42ms] Passed 4 tests

A check of server-side resources used by Google Plus Share and +1 Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.26 ▼1.26
Dashboard /wp-admin2.99 ▼0.3123.56 ▼20.73
Posts /wp-admin/edit.php2.99 ▼0.3622.73 ▼27.74
Add New Post /wp-admin/post-new.php2.99 ▼2.8922.68 ▼70.19
Media Library /wp-admin/upload.php2.99 ▼0.2321.67 ▼11.02
Google Plus Settings /wp-admin/options-general.php?page=Google_Plus_Settings2.9921.58

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google Plus Share and +1 Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.30 ▼1.455.57 ▲3.7740.32 ▼7.74
Dashboard /wp-admin2,210 ▲195.83 ▼0.0496.28 ▼1.1837.79 ▼4.39
Posts /wp-admin/edit.php2,093 ▲72.04 ▲0.0533.89 ▼6.0537.73 ▼0.09
Add New Post /wp-admin/post-new.php1,536 ▲1723.34 ▲0.38684.60 ▲41.1752.81 ▼9.14
Media Library /wp-admin/upload.php1,395 ▲44.19 ▼0.0396.97 ▼3.5944.26 ▲1.43
Google Plus Settings /wp-admin/options-general.php?page=Google_Plus_Settings7832.0325.5825.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Google_Plus_Settings
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=Google_Plus_Settings
    • > Notice in wp-content/plugins/google-plus-share-and-plusone-button/gpsb-settings.php+3
    Undefined index: gpsb_hidden

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/google-plus-share-and-plusone-button/google-plus-share-and-plusone-button.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/google-plus-share-and-plusone-button/gpsb-settings.php:23
    • > PHP Notice
      Undefined index: gpsb_hidden in wp-content/plugins/google-plus-share-and-plusone-button/gpsb-settings.php on line 3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: google share button, google plus, google 1 button, google, googleplus...

google-plus-share-and-plusone-button/google-plus-share-and-plusone-button.php Passed 13 tests

The main file in "Google Plus Share and +1 Button" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
68 characters long description:
Puts a Google Plus +1 Button to top of Pages and Posts. 3oopx wide..

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected63 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2181163

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.12
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 Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin