68% simple-gplus-widget

Code Review | Simple Gplus Widget

WordPress plugin Simple Gplus Widget scored68%from 54 tests.

About plugin

  • Plugin page: simple-gplus-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Dec 9, 2016
  • Latest release: Dec 15, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: amybeagh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /438 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.91MB] [CPU: ▼34.97ms] Passed 4 tests

An overview of server-side resources used by Simple Gplus Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0436.20 ▲0.44
Dashboard /wp-admin3.04 ▼0.2721.97 ▼27.46
Posts /wp-admin/edit.php3.04 ▼0.3223.02 ▼22.45
Add New Post /wp-admin/post-new.php3.04 ▼2.8523.72 ▼74.18
Media Library /wp-admin/upload.php3.04 ▼0.2022.50 ▼15.79
Simple Gplus Widget /wp-admin/options-general.php?page=simple-gplus-widget/simple-gplus-widget.php3.0424.71

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Gplus Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲3714.48 ▲0.171.62 ▼0.3739.61 ▼5.02
Dashboard /wp-admin2,206 ▲175.77 ▲0.6994.80 ▼31.2040.99 ▼6.29
Posts /wp-admin/edit.php2,095 ▲62.00 ▼0.1434.51 ▼2.4436.25 ▲2.52
Add New Post /wp-admin/post-new.php1,420 ▼11320.13 ▼3.11578.51 ▼99.8944.97 ▼10.68
Media Library /wp-admin/upload.php1,391 ▼04.23 ▼0.0391.97 ▼8.4740.99 ▼4.37
Simple Gplus Widget /wp-admin/options-general.php?page=simple-gplus-widget/simple-gplus-widget.php8642.3224.2230.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/simple-gplus-widget/simple-gplus-widget.php+165
    Non-static method gpw_GplusWidgets::gpw_add_real_fb_tools_options_page() should not be called statically
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=simple-gplus-widget/simple-gplus-widget.php
    • > Deprecated in wp-content/plugins/simple-gplus-widget/simple-gplus-widget.php+165
    Non-static method gpw_GplusWidgets::gpw_add_real_fb_tools_options_page() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=simple-gplus-widget/simple-gplus-widget.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method gpw_GplusWidgets::gpw_badge_options() should not be called statically

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-gplus-widget/simple-gplus-widget.php:162

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: simple gplus widget plugin, wordpress gplus widget, gplus widget, google plus, google slider display

simple-gplus-widget/simple-gplus-widget.php 92% from 13 tests

The main PHP script in "Simple Gplus Widget" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 148 characters long)

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 plugin274 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15739189
CSS121085

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/googlesgw-icon2.png1.70KB1.07KB▼ 37.36%