10% gplus

Code Review | GPlus

WordPress plugin GPlus scored10%from 54 tests.

About plugin

  • Plugin page: gplus
  • Plugin version: 2012.06.20
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.2
  • WordPress version: 6.3.1
  • First release: May 20, 2012
  • Latest release: Jun 21, 2012
  • Number of updates: 18
  • Update frequency: every 2.0 days
  • Top authors: dpchiesa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,140 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/gplus/lib/service/apiUtils.php+58
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.51MB] [CPU: ▼45.03ms] Passed 4 tests

An overview of server-side resources used by GPlus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.48 ▼0.989.47 ▼31.80
Dashboard /wp-admin2.49 ▼0.8111.30 ▼36.75
Posts /wp-admin/edit.php2.49 ▼0.8610.47 ▼34.01
Add New Post /wp-admin/post-new.php2.49 ▼3.3911.90 ▼77.56
Media Library /wp-admin/upload.php2.49 ▼0.748.96 ▼28.09

Server storage [IO: ▲0.98MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/gplus/" and "wp-content/uploads/"
    • (new file) wp-content/cache/.empty
Filesystem: 60 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_googlepluswidget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by GPlus
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.28 ▼1.361.76 ▼0.1840.45 ▼8.44
Dashboard /wp-admin2,206 ▲184.85 ▼0.05101.37 ▼1.3640.29 ▼10.10
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0836.88 ▼1.3132.54 ▼4.19
Add New Post /wp-admin/post-new.php1,519 ▼1423.19 ▲0.02640.32 ▼41.2555.02 ▲10.28
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0693.92 ▼7.8940.71 ▼6.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in GooglePlusWidget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_googlepluswidget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 65× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'service/apiModel.php' (include_path='.:/usr/share/php') in wp-content/plugins/gplus/lib/contrib/apiLatitudeService.php on line 18
    • > PHP Warning
      require_once(service/apiModel.php): failed to open stream: No such file or directory in wp-content/plugins/gplus/lib/contrib/apiWebfontsService.php on line 18
    • > PHP Warning
      require_once(service/apiModel.php): failed to open stream: No such file or directory in wp-content/plugins/gplus/lib/contrib/apiCalendarService.php on line 18
    • > PHP Fatal error
      require_once(): Failed opening required 'service/apiModel.php' (include_path='.:/usr/share/php') in wp-content/plugins/gplus/lib/contrib/apiModeratorService.php on line 18
    • > PHP Warning
      require_once(service/apiModel.php): failed to open stream: No such file or directory in wp-content/plugins/gplus/lib/contrib/apiPredictionService.php on line 18
    • > PHP Fatal error
      require_once(): Failed opening required 'service/apiModel.php' (include_path='.:/usr/share/php') in wp-content/plugins/gplus/lib/contrib/apiWebfontsService.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'apiServiceResource' not found in wp-content/plugins/gplus/lib/contrib/apiBigqueryService.php:27
    • > PHP Warning
      require_once(service/apiModel.php): failed to open stream: No such file or directory in wp-content/plugins/gplus/lib/contrib/apiLatitudeService.php on line 18
    • > PHP Fatal error
      require_once(): Failed opening required 'service/apiModel.php' (include_path='.:/usr/share/php') in wp-content/plugins/gplus/lib/contrib/apiPagespeedonlineService.php on line 18
    • > PHP Fatal error
      require_once(): Failed opening required 'service/apiServiceResource.php' (include_path='.:/usr/share/php') in wp-content/plugins/gplus/lib/service/apiService.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This shows the rendering of the Widget in the sidebar of a WP blog.), #2 (This shows how to activate gplus in the Plugins menu in the WP Admin backend), #3 (Configuring the settings for the gplus widget in the WP Admin backend.)
You can look at the official readme.txt

gplus/gplus.php Passed 13 tests

This is the main PHP file of "GPlus" version 2012.06.20, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
140 characters long description:
A widget that shows Google+ Activities. Specify the G+ id and the API Key, and place it on your blog template, and the widget does the rest.

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 plugin19,576 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
PHP541,3295,49419,576

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.07
Average class complexity2.16
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity1.15
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes527
▷ Abstract classes40.76%
▷ Concrete classes52399.24%
▷ Final classes00.00%
Methods4,058
▷ Static methods260.64%
▷ Public methods4,01698.97%
▷ Protected methods90.22%
▷ Private methods330.81%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants320.00%
▷ Class constants1280.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png36.60KB21.40KB▼ 41.55%
screenshot-1.png14.17KB7.21KB▼ 49.12%
i/gplus-logo-48x48.png3.59KB2.21KB▼ 38.52%
screenshot-3.png12.69KB7.70KB▼ 39.36%