68% engaging-buttons

Code Review | Engaging Buttons

WordPress plugin Engaging Buttons scored68%from 54 tests.

About plugin

  • Plugin page: engaging-buttons
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Jan 25, 2016
  • Latest release: Mar 3, 2021
  • Number of updates: 17
  • Update frequency: every 109.8 days
  • Top authors: jeryj (88.24%)Luke Carl (17.65%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,085 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.92MB] [CPU: ▼33.30ms] Passed 4 tests

An overview of server-side resources used by Engaging Buttons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.83 ▲5.67
Dashboard /wp-admin3.03 ▼0.2725.60 ▼22.49
Posts /wp-admin/edit.php3.03 ▼0.3326.20 ▼20.08
Add New Post /wp-admin/post-new.php3.03 ▼2.8626.84 ▼77.94
Media Library /wp-admin/upload.php3.03 ▼0.2022.02 ▼12.69
Engaging Buttons /wp-admin/options-general.php?page=enp_button_page3.0323.30

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 7 new options
New WordPress options
widget_enp_popular_widget
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Engaging Buttons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲20714.19 ▼0.195.38 ▲3.7238.78 ▼0.09
Dashboard /wp-admin2,224 ▲355.12 ▲0.18110.86 ▲4.0645.81 ▲5.27
Posts /wp-admin/edit.php2,121 ▲322.33 ▲0.2843.44 ▲5.6433.59 ▼2.61
Add New Post /wp-admin/post-new.php1,535 ▲1623.30 ▲0.19669.48 ▼44.0735.75 ▼16.06
Media Library /wp-admin/upload.php1,415 ▲274.53 ▲0.33100.94 ▼8.5440.87 ▼9.17
Engaging Buttons /wp-admin/options-general.php?page=enp_button_page1,3192.6043.1534.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_enp_popular_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

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)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=enp_button_page
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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 items
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/engaging-buttons/front-end/popular_buttons/popular-button-shortcode.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/engaging-buttons/front-end/popular_buttons/popular-button-interface.php:94
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/engaging-buttons/front-end/functions/button-display.php:64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/engaging-buttons/inc/Enp_Button_Loader.php:55
    • > PHP Fatal error
      Uncaught Error: Class 'Enp_Popular_Buttons' not found in wp-content/plugins/engaging-buttons/front-end/popular_buttons/Enp_Popular_Loop.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/engaging-buttons/front-end/functions/ajax-data.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/engaging-buttons/admin/settings/data-opt-in.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/engaging-buttons/admin/functions/plugin-activated.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/engaging-buttons/admin/widgets/popular-button-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/engaging-buttons/admin/functions/scheduled-events.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (25 tag instead of maximum 10)
The official readme.txt is a good inspiration

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

Analyzing the main PHP file in "Engaging Buttons" version 1.0.6
58 characters long description:
A plugin for giving respect to posts, pages, and comments.

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
No dangerous file extensions were detected3,530 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP217279152,182
JavaScript3210212707
Sass221004531
CSS9231110

PHP code Passed 2 tests

This is a very shot review 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.32
Average class complexity17.57
▷ Minimum class complexity7.00
▷ Maximum class complexity29.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods56
▷ Static methods00.00%
▷ Public methods3358.93%
▷ Protected methods2341.07%
▷ Private methods00.00%
Functions79
▷ Named functions79100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected