10% kd-google-plus-badge

Code Review | KdTips Google Plus badge

WordPress plugin KdTips Google Plus badge scored 10% from 54 tests.

About plugin

  • Plugin page: kd-google-plus-badge
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Nov 13, 2012
  • Latest release: Sep 5, 2013
  • Number of updates: 16
  • Update frequency: every 18.6 days
  • Top authors: kdtips (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active / 3,382 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/kd-google-plus-badge/kd_google_plus_badge.php+26
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.43ms] Passed 4 tests

A check of server-side resources used by KdTips Google Plus badge
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.60 ▼35.54
Dashboard /wp-admin2.05 ▼1.266.25 ▼42.12
Posts /wp-admin/edit.php2.05 ▼1.315.97 ▼42.61
Add New Post /wp-admin/post-new.php2.05 ▼3.845.47 ▼93.43
Media Library /wp-admin/upload.php2.05 ▼1.185.62 ▼27.75
google-badge /wp-admin/options-general.php?page=kd-google-plus-badge2.055.73

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

Filesystem and database footprint
Just a few items left to fix
  • Illegal file modification detected: 1 file (0.00KB) outside of "wp-content/plugins/kd-google-plus-badge/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/kd-google-plus-badge/banner-772\303\227250.png"
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_kd_google_plus_badge

Browser metrics Passed 4 tests

A check of browser resources used by KdTips Google Plus badge
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.66 ▼0.721.89 ▲0.1742.35 ▼3.66
Dashboard /wp-admin2,213 ▲254.85 ▼0.0398.53 ▼22.8238.63 ▼2.03
Posts /wp-admin/edit.php2,093 ▲41.99 ▲0.0039.97 ▲0.5935.32 ▲0.51
Add New Post /wp-admin/post-new.php1,545 ▲1218.22 ▼4.80616.46 ▲26.1152.26 ▲2.48
Media Library /wp-admin/upload.php1,395 ▲104.18 ▲0.0594.43 ▼7.1443.67 ▼1.42
google-badge /wp-admin/options-general.php?page=kd-google-plus-badge9302.0325.0727.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/kd-google-plus-badge/kd_google_plus_badge.php+26
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_kd_google_plus_badge

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)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=kd-google-plus-badge
    • > Deprecated in wp-content/plugins/kd-google-plus-badge/kd_google_plus_badge.php+26
    Function create_function() is deprecated

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kd-google-plus-badge/kd_google_plus_badge.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: social networking, badge, google, google-plus, google-plus-pages...

kd-google-plus-badge/kd_google_plus_badge.php 92% from 13 tests

The main file in "KdTips Google Plus badge" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kd-google-plus-badge.php" instead of "kd_google_plus_badge.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected251 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16263251

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity18.00
▷ Minimum class complexity16.00
▷ Maximum class complexity20.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
4 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot1.PNG13.24KB7.32KB▼ 44.71%
banner-772×250.png76.78KB22.05KB▼ 71.28%
screenshot.PNG30.00KB10.04KB▼ 66.52%
screenshot2.PNG16.87KB8.48KB▼ 49.70%