73% google-badge-widget

Code Review | Google+ Badge Widget

WordPress plugin Google+ Badge Widget scored73%from 54 tests.

About plugin

  • Plugin page: google-badge-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 19, 2012
  • Latest release: Sep 19, 2012
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: ahmedeqbal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /4,777 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.59MB] [CPU: ▼51.90ms] Passed 4 tests

Analyzing server-side resources used by Google+ Badge Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.39 ▼1.0710.06 ▼29.49
Dashboard /wp-admin2.43 ▼0.9112.26 ▼55.71
Posts /wp-admin/edit.php2.43 ▼0.9213.84 ▼31.77
Add New Post /wp-admin/post-new.php2.43 ▼3.4513.26 ▼90.61
Media Library /wp-admin/upload.php2.43 ▼0.7912.00 ▼22.64

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google+ Badge Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.61 ▼0.066.77 ▲5.0738.15 ▼5.71
Dashboard /wp-admin2,211 ▲205.83 ▲0.94113.41 ▼0.8539.44 ▲2.71
Posts /wp-admin/edit.php2,094 ▲22.65 ▲0.6449.54 ▲12.1537.33 ▲3.98
Add New Post /wp-admin/post-new.php1,543 ▲1523.77 ▲5.34722.97 ▲77.1138.03 ▼20.03
Media Library /wp-admin/upload.php1,390 ▲24.99 ▲0.79104.53 ▲3.2543.27 ▼3.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 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/google-badge-widget/google-plus-badge-widget.php:129

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 90% 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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Screenshot of Google+ Badge Widget in Front End.), #2 (Screenshot of Admin-Panel Widget area.)
Please take inspiration from this readme.txt

google-badge-widget/google-plus-badge-widget.php 85% from 13 tests

The primary PHP file in "Google+ Badge Widget" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("google-badge-widget.php" instead of "google-plus-badge-widget.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 309 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected58 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1333958

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
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

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png18.28KB7.71KB▼ 57.82%
screenshot-2.png11.59KB5.63KB▼ 51.41%
images/help.png0.73KB0.70KB▼ 4.17%