76% shuuka-social-links

Code Review | Shuuka social links

WordPress plugin Shuuka social links scored76%from 54 tests.

About plugin

  • Plugin page: shuuka-social-links
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4.45+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 4, 2020
  • Latest release: Feb 4, 2020
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: shuuka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /486 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.32MB] [CPU: ▲1,829.81ms] 50% from 4 tests

This is a short check of server-side resources used by Shuuka social links
Please fix the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 521.23ms on /wp-admin/admin.php?page=shuuka_options&tab=1)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 1,829.81ms on /wp-admin/admin.php?page=shuuka_options&tab=1)
PageMemory (MB)CPU Time (ms)
Home /4.78 ▲1.3252.86 ▲14.25
Dashboard /wp-admin4.94 ▲1.643,513.80 ▲3,462.71
Posts /wp-admin/edit.php4.67 ▲1.31528.92 ▲476.70
Add New Post /wp-admin/post-new.php7.20 ▲1.323,475.50 ▲3,382.20
Media Library /wp-admin/upload.php4.54 ▲1.313,482.36 ▲3,446.07
Options Object /wp-admin/admin.php?page=shuuka_options&tab=25.05681.32
Settings /wp-admin/admin.php?page=shuuka_options&tab=14.81521.23

Server storage [IO: ▲5.65MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Shuuka social links
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18213.25 ▼1.191.73 ▲0.0791.75 ▲49.36
Dashboard /wp-admin2,326 ▲1384.87 ▲0.0096.07 ▼13.2190.95 ▲46.93
Posts /wp-admin/edit.php2,150 ▲582.01 ▲0.0136.92 ▼2.5534.65 ▼1.81
Add New Post /wp-admin/post-new.php1,731 ▲20324.49 ▲5.95642.60 ▼35.7553.48 ▼1.52
Media Library /wp-admin/upload.php1,443 ▲554.07 ▼0.1795.77 ▼6.7674.65 ▲30.48
Options Object /wp-admin/admin.php?page=shuuka_options&tab=21,1402.5754.4143.46
Settings /wp-admin/admin.php?page=shuuka_options&tab=11,1402.7652.5035.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • shuuka_user_page_setting-transients
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 106× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Redux_Customizer_Control' not found in wp-content/plugins/shuuka-social-links/vendor/redux-framework/ReduxCore/inc/extensions/customizer/inc/customizer_fields.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/shuuka-social-links/vendor/class.dvg-request/Requests/Exception/HTTP/418.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/shuuka-social-links/vendor/class.shuuka-request/Requests/Exception/HTTP/505.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/shuuka-social-links/vendor/redux-framework/ReduxCore/inc/extensions/customizer/inc/customizer_control.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/shuuka-social-links/vendor/class.dvg-request/Requests/Exception/HTTP/304.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/shuuka-social-links/vendor/class.shuuka-request/Requests/Exception/HTTP/413.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_Transport' not found in wp-content/plugins/shuuka-social-links/vendor/class.dvg-request/Requests/Exception/Transport/cURL.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/shuuka-social-links/vendor/class.shuuka-request/Requests/Exception/HTTP/404.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/shuuka-social-links/vendor/class.shuuka-request/Requests/Exception/HTTP/407.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/shuuka-social-links/vendor/class.dvg-request/Requests/Exception/HTTP/305.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shuuka_options&tab=1
    • > Javascript (severe) in unknown
    /wp-content/plugins/shuuka-social-links/vendor/redux-framework/ReduxCore/inc/extensions/options_object/options_object/field_options_object.js?ver=4.0 5:4 Uncaught ReferenceError: redux is not defined
    • > GET request to /wp-admin/admin.php?page=shuuka_options&tab=2
    • > Javascript (severe) in unknown
    /wp-content/plugins/shuuka-social-links/vendor/redux-framework/ReduxCore/assets/js/redux.js?ver=3.6.17.1697013566 639:26 Uncaught TypeError: Cannot use 'in' operator to search for 'options_object' in undefined
    • > GET request to /wp-admin/admin.php?page=shuuka_options&tab=1
    • > Javascript (severe) in unknown
    /wp-content/plugins/shuuka-social-links/vendor/redux-framework/ReduxCore/assets/js/redux.js?ver=3.6.17.1697013569 639:26 Uncaught TypeError: Cannot use 'in' operator to search for 'password' in undefined

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Contributors: The plugin contributors field is not present
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === shuuka-social-links === )
The official readme.txt might help

shuuka-social-links/shuuka-social-links.php 85% from 13 tests

The principal PHP file in "Shuuka social links" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "4.0.0")
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.2.4" instead of "5.4.45")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin41,548 lines of code in 366 files:
LanguageFilesBlank linesComment linesLines of code
PHP1724,5809,11919,682
JavaScript852,5911,92911,977
Sass541,187607,580
SVG4031,020
JSON11840909
CSS47935236
XML11090
LESS10053
Markdown1001

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity21.33
▷ Minimum class complexity1.00
▷ Maximum class complexity882.00
Average method complexity5.78
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces0
Interfaces8
Traits0
Classes213
▷ Abstract classes00.00%
▷ Concrete classes213100.00%
▷ Final classes00.00%
Methods954
▷ Static methods21322.33%
▷ Public methods73577.04%
▷ Protected methods16317.09%
▷ Private methods565.87%
Functions26
▷ Named functions2596.15%
▷ Anonymous functions13.85%
Constants106
▷ Global constants00.00%
▷ Class constants106100.00%
▷ Public constants106100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
55 PNG files occupy 1.09MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/redux-framework/ReduxCore/assets/img/1c.png0.13KB0.13KB▼ 0.72%
vendor/redux-framework/ReduxCore/templates/panel/assets/shuuka-logo.png14.72KB7.69KB▼ 47.79%
assets/icons/apple-icon-152x152.png18.62KB2.09KB▼ 88.79%
vendor/redux-framework/ReduxCore/inc/fields/switch/slider-control.png1.65KB0.75KB▼ 54.62%
vendor/redux-framework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%