10% wp-gratify-socialproofing

Code Review | WP Gratify-Socialproofing

WordPress plugin WP Gratify-Socialproofing scored10%from 54 tests.

About plugin

  • Plugin page: wp-gratify-social...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.3
  • WordPress version: 6.3.1
  • First release: Aug 3, 2019
  • Latest release: Nov 29, 2019
  • Number of updates: 5
  • Update frequency: every 25.6 days
  • Top authors: anusha95 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /511 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'mid_create_plugin_database_table' not found or invalid function name

Server metrics [RAM: ▲0.26MB] [CPU: ▼7.26ms] Passed 4 tests

A check of server-side resources used by WP Gratify-Socialproofing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1838.74 ▼4.10
Dashboard /wp-admin3.61 ▲0.3046.00 ▼1.03
Posts /wp-admin/edit.php3.68 ▲0.3247.37 ▲1.85
Add New Post /wp-admin/post-new.php6.22 ▲0.3371.15 ▼22.15
Media Library /wp-admin/upload.php3.47 ▲0.2331.80 ▼1.75
All /wp-admin/admin.php?page=wp_grv_sp_slug3.4833.92
Settings /wp-admin/admin.php?page=wp-grv-sp-settings-menu3.3933.74
Add New /wp-admin/admin.php?page=wp-grv-sp-add-new-menu3.4834.34

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Gratify-Socialproofing
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,107 ▲36115.58 ▲0.9712.50 ▲10.8140.89 ▼8.32
Dashboard /wp-admin2,381 ▲1966.47 ▲1.56130.22 ▲15.2439.25 ▼4.32
Posts /wp-admin/edit.php2,287 ▲1983.45 ▲1.4155.69 ▲17.1334.58 ▼2.51
Add New Post /wp-admin/post-new.php1,545 ▲1223.36 ▲0.01657.54 ▼40.8930.57 ▼28.43
Media Library /wp-admin/upload.php1,417 ▲294.20 ▼0.0082.77 ▼20.2244.27 ▲0.40
All /wp-admin/admin.php?page=wp_grv_sp_slug1,3483.9668.6682.70
Settings /wp-admin/admin.php?page=wp-grv-sp-settings-menu1,5483.7961.6087.69
Add New /wp-admin/admin.php?page=wp-grv-sp-add-new-menu1,2443.9749.9333.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% 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)
Almost there, just fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-grv-sp-settings-menu
    • > Notice in wp-content/plugins/wp-gratify-socialproofing/pages/wp-gratify-settings-page.php+82
    Trying to access array offset on value of type bool

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
  • 5× 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/wp-gratify-socialproofing/wp-grv-sp-tbl-operations/class-wp-grv-sp-tbl-operation.php:163
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-gratify-socialproofing/wp-grv-sp-social-proofing/class-wp-grv-sp-social-proofing-ajax.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-gratify-socialproofing/class-wp-gratify-social-proofing-meta-box.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-gratify-socialproofing/class-wp-gratify-social-proofing-meta-box.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-gratify-socialproofing/wp-grv-sp-tbl-operations/class-wp-grv-sp-settings-tbl-operation.php:30

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=wp_grv_sp_slug
    • > Network (severe)
    wp-content/plugins/wp-gratify/assets/css/admin/wp-grv-loader/wp-grv-delete-success-icon.gif - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=wp_grv_sp_slug
    • > Network (severe)
    wp-content/plugins/wp-gratify/assets/css/admin/wp-grv-loader/wp-grv-delete-loader-icon.gif - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-grv-sp-add-new-menu
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-gratify-socialproofing//assets/js/admin/wp-grv-sp-script-back-end.js?ver=1.0.0:72:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-grv-sp-add-new-menu
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-gratify-socialproofing//assets/js/admin/wp-grv-sp-backend-ajax-script.js?ver=1.0.0:47:38)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-grv-sp-add-new-menu
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: The official readme.txt is a good inspiration

wp-gratify-socialproofing/class-wp-gratify-social-proofing.php 92% from 13 tests

The main PHP file in "WP Gratify-Socialproofing" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-gratify-socialproofing.php" instead of "class-wp-gratify-social-proofing.php")

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 plugin4,739 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS9511272,227
JavaScript83436091,815
PHP82386696
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.60
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods21
▷ Static methods21100.00%
▷ Public methods21100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/external/images/sort_desc_disabled.png0.14KB0.25KB0.00%
assets/external/images/sort_desc.png0.15KB0.25KB0.00%
assets/external/images/sort_both.png0.20KB0.29KB0.00%
assets/external/images/sort_asc.png0.16KB0.25KB0.00%
assets/external/images/sort_asc_disabled.png0.14KB0.25KB0.00%