10% super-buttons

Code Review | Super Buttons

WordPress plugin Super Buttons scored10%from 54 tests.

About plugin

  • Plugin page: super-buttons
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2.1
  • WordPress version: 6.3.1
  • First release: Jul 2, 2018
  • Latest release: Jun 17, 2019
  • Number of updates: 15
  • Update frequency: every 23.5 days
  • Top authors: thewebsitedev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /937 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/super-buttons/shortcode.php+51
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.46MB] [CPU: ▼50.92ms] Passed 4 tests

Analyzing server-side resources used by Super Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.52 ▼0.946.86 ▼35.39
Dashboard /wp-admin2.54 ▼0.767.88 ▼39.38
Posts /wp-admin/edit.php2.54 ▼0.818.99 ▼40.00
Add New Post /wp-admin/post-new.php2.54 ▼3.349.15 ▼88.92
Media Library /wp-admin/upload.php2.54 ▼0.687.83 ▼26.58

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 42 new files
Database: 2 new tables, 7 new options
New tables
wp_super_buttons_meta
wp_super_buttons
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
_sb_meta_db
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Super Buttons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲18913.65 ▼0.7310.09 ▲8.4439.85 ▼6.20
Dashboard /wp-admin2,220 ▲355.80 ▲0.94103.41 ▼1.5579.71 ▲34.23
Posts /wp-admin/edit.php2,097 ▲51.98 ▼0.0233.99 ▼4.1132.45 ▲0.27
Add New Post /wp-admin/post-new.php6,429 ▲4,90428.86 ▲6.00887.75 ▲224.2138.07 ▼14.63
Media Library /wp-admin/upload.php1,396 ▲54.24 ▲0.04100.40 ▼2.2664.65 ▲20.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/super-buttons/shortcode.php+51
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • Zombie tables detected upon uninstall: 2 tables
    • wp_super_buttons
    • wp_super_buttons_meta
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • _sb_meta_db
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 21× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-buttons/admin/import.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-buttons/admin/ajax/button/title.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-buttons/admin/ajax/settings.php:34
    • > PHP Fatal error
      require(): Failed opening required 'SUPER_BUTTONS__PLUGIN_DIRcss.php' (include_path='.:/usr/share/php') in wp-content/plugins/super-buttons/functions.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-buttons/admin/export.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-buttons/admin/ajax.php:29
    • > PHP Warning
      require(SUPER_BUTTONS__PLUGIN_DIRcss.php): failed to open stream: No such file or directory in wp-content/plugins/super-buttons/functions.php on line 9
    • > PHP Warning
      require(SUPER_BUTTONS__PLUGIN_DIRadmin/fonts.php): failed to open stream: No such file or directory in wp-content/plugins/super-buttons/admin/functions.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/super-buttons/shortcode.php:100
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-buttons/admin/admin.php:82

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: gutenberg buttons, share buttons, social buttons, buttons, wordpress buttons

super-buttons/super-buttons.php Passed 13 tests

Analyzing the main PHP file in "Super Buttons" version 1.4.0
38 characters long description:
The best buttons plugin for WordPress.

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
No dangerous file extensions were detected18,797 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript74,8682,61610,564
CSS41,2842,8315,288
PHP22916862,597
PO File1158280348

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.62
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%
Functions42
▷ Named functions3890.48%
▷ Anonymous functions49.52%
Constants7
▷ Global constants7100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/superman.png0.92KB0.68KB▼ 26.53%