67% godinterest-share-button

Code Review | GodInterest Share Button

WordPress plugin GodInterest Share Button scored 67% from 54 tests.

About plugin

  • Plugin page: godinterest-share...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 5.8.1
  • First release: Jul 1, 2014
  • Latest release: Jul 1, 2014
  • Number of updates: 5
  • Update frequency: every 8.2 days
  • Top authors: Data66 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 904 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.00MB] [CPU: ▼154.70ms] Passed 4 tests

This is a short check of server-side resources used by GodInterest Share Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.2632.99 ▲11.21
Dashboard /wp-admin3.25 ▲0.1944.38 ▼2.02
Posts /wp-admin/edit.php3.31 ▲0.2043.78 ▼2.94
Add New Post /wp-admin/post-new.php4.83 ▼0.6055.86 ▼609.80
Media Library /wp-admin/upload.php3.19 ▲0.1931.88 ▼4.04
Godinterest Share /wp-admin/options-general.php?page=godinterest-share-button3.1529.63

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 60 new files
Database: no new tables, 1 new option
New WordPress options
widget_foo_widget

Browser metrics Passed 4 tests

A check of browser resources used by GodInterest Share Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,735 ▲13916.50 ▲0.897.63 ▼1.7148.28 ▼1.89
Dashboard /wp-admin3,027 ▲906.62 ▲0.70141.22 ▼10.92113.53 ▼6.04
Posts /wp-admin/edit.php2,839 ▲1003.10 ▲0.4189.61 ▲19.3793.15 ▼1.04
Add New Post /wp-admin/post-new.php1,678 ▲7222.05 ▲3.18270.24 ▼112.19121.28 ▲7.32
Media Library /wp-admin/upload.php1,898 ▲855.56 ▲0.56148.51 ▼14.66117.02 ▼2.31
Godinterest Share /wp-admin/options-general.php?page=godinterest-share-button1,7103.0383.14131.76

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_foo_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 63 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=godinterest-share-button
    • > Notice in wp-content/plugins/godinterest-share-button/includes/common/controls.php+141
    Undefined index: id
  • 57 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=godinterest-share-button
    • > Notice in wp-content/plugins/godinterest-share-button/includes/common/controls.php+141
    Undefined index: style
  • 62 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=godinterest-share-button
    • > Notice in wp-content/plugins/godinterest-share-button/includes/common/controls.php+141
    Undefined index: class
  • 35 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=godinterest-share-button
    • > Notice in wp-content/plugins/godinterest-share-button/includes/common/controls.php+140
    Undefined index: type
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=godinterest-share-button
    • > Notice in wp-content/plugins/godinterest-share-button/includes/common/controls.php+141
    Undefined index: colspan
    • > GET request to /wp-admin/options-general.php?page=godinterest-share-button
    • > Notice in wp-content/plugins/godinterest-share-button/includes/settings.php+44
    Undefined variable: sectionName

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/godinterest-share-button/includes/common/popups/posts.php
    • > /wp-content/plugins/godinterest-share-button/includes/common/popups/pages.php
    • > /wp-content/plugins/godinterest-share-button/includes/common/popups/categories.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/godinterest-share-button/includes/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/godinterest-share-button/includes/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/godinterest-share-button/includes/insert-button.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/godinterest-share-button/includes/widget.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=godinterest-share-button
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'msie')" "TypeError: Cannot read properties of undefined (reading 'msie')\n at iOSCheckbox.disableTextSelection (/wp-content/plugins/godinterest-share-button/includes/common/js/iphone-style-checkboxes.js?ver=5.8.1:38:26)\n at new iOSCheckbox (/wp-content/plugins/godinterest-share-button/includes/common/js/iphone-style-checkboxes.js?ver=5.8.1:16:12)\n at s.fn.init.jQuery.fn.iphoneStyle (/wp-content/plugins/godinterest-share-button/includes/common/js/iphone-style-checkboxes.js?ver=5.8.1:261:9)\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=godinterest-share-button:167:4167)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=godinterest-share-button
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: church, christian pinterest, bible, jesus, christian social network...

godinterest-share-button/godinterest-share-button .php 92% from 13 tests

The main PHP file in "GodInterest Share Button" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("godinterest-share-button.php" instead of "godinterest-share-button .php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,546 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript82563231,443
PHP133611955
CSS168148

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
33 PNG files occupy 0.14MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/common/images/iphone_on.png5.27KB2.24KB▼ 57.44%
includes/common/images/loading_background.png0.15KB0.15KB▼ 0.64%
images/share_button_3_dark.png4.75KB2.25KB▼ 52.52%
includes/common/images/ClosedTabBackgroundHover.png0.48KB0.32KB▼ 34.22%
includes/common/images/iphone_off.png2.52KB2.54KB0.00%