72% google-plus-comments

Code Review | Google+ Comments

WordPress plugin Google+ Comments scored72%from 54 tests.

About plugin

  • Plugin page: google-plus-comments
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 25, 2013
  • Latest release: Apr 25, 2013
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: alexmoss (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

100+ active /11,309 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.18ms] Passed 4 tests

Analyzing server-side resources used by Google+ Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.42 ▼5.11
Dashboard /wp-admin3.34 ▲0.0445.18 ▼5.26
Posts /wp-admin/edit.php3.39 ▲0.0450.17 ▲1.19
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.59 ▼7.53
Media Library /wp-admin/upload.php3.27 ▲0.0435.27 ▲2.56
Google+ Comments /wp-admin/options-general.php?page=gpcomments3.2131.74

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Google+ Comments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲11613.92 ▼0.6328.56 ▲26.3245.33 ▲1.95
Dashboard /wp-admin2,210 ▲224.86 ▼0.03107.72 ▼6.2441.80 ▼3.05
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0240.03 ▲4.3236.45 ▼1.06
Add New Post /wp-admin/post-new.php1,536 ▲323.44 ▲0.43715.30 ▲60.8459.59 ▼5.21
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0395.42 ▼6.4742.41 ▼3.88
Google+ Comments /wp-admin/options-general.php?page=gpcomments1,4107.54260.5779.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • gpcomments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gpcomments
    • > Warning in wp-content/plugins/google-plus-comments/class-admin.php+162
    Use of undefined constant AUTHOR_TWITTER - assumed 'AUTHOR_TWITTER' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=gpcomments
    • > Warning in wp-content/plugins/google-plus-comments/class-admin.php+185
    Use of undefined constant DONATE_LINK - assumed 'DONATE_LINK' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=gpcomments
    • > Warning in wp-content/plugins/google-plus-comments/class-admin.php+208
    Invalid argument supplied for foreach()

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/google-plus-comments/class-admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/google-plus-comments/class-frontend.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/google-plus-comments/google-plus-comments.php:22

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=gpcomments
    • > Network (severe)
    http://platform.stumbleupon.com/1/widgets.js - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/options-general.php?page=gpcomments
    • > Javascript (severe) in unknown
    https://button.buffer.com/button/?id=039cf15de92ecc4d&url=http%3A%2F%2F3doordigital.com%2Fwordpress%2Fplugins%2Fgoogle-plus-comments%2F&text=Just%20been%20using%20Google%2B%20Comments%20%23WordPress%20plugin&via=AUTHOR_TWITTER&count=horizontal&placement=button&utm_source=http%3A%2F%2Fwp.com%2Fwp-admin%2Foptions-general.php%3Fpage%3Dgpcomments&utm_medium=buffer_button&utm_campaign=buffer 15:647 Uncaught TypeError: Cannot set properties of null (setting 'onclick')
    • > GET request to /wp-admin/options-general.php?page=gpcomments
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
10 plugin tags: widgets, page, pages, commenting, wordpress...

google-plus-comments/google-plus-comments.php 92% from 13 tests

The main file in "Google+ Comments" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 283 characters long)

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 plugin400 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34219299
CSS1120101

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
3dd-logo.png14.63KB5.34KB▼ 63.49%