68% wpac-like-system

Code Review | WPAC Social Tools - Like, React & Share

WordPress plugin WPAC Social Tools - Like, React & Share scored68%from 54 tests.

About plugin

  • Plugin page: wpac-like-system
  • Plugin version: 3.0.3
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Oct 11, 2018
  • Latest release: May 14, 2020
  • Number of updates: 48
  • Update frequency: every 12.1 days
  • Top authors: mianshahzadraza (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active /9,754 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.57ms] Passed 4 tests

Analyzing server-side resources used by WPAC Social Tools - Like, React & Share
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.59 ▲7.45
Dashboard /wp-admin3.41 ▲0.1160.20 ▲11.68
Posts /wp-admin/edit.php3.46 ▲0.1146.87 ▼0.32
Add New Post /wp-admin/post-new.php6.02 ▲0.1389.14 ▼11.26
Media Library /wp-admin/upload.php3.34 ▲0.1134.05 ▲1.86
WPAC Settings /wp-admin/admin.php?page=wpac-settings3.3134.34
Like/Dislike /wp-admin/admin.php?page=wpac-button-settings3.3135.68
Sharing /wp-admin/admin.php?page=wpac-sharing-settings3.3132.13
Reactions /wp-admin/admin.php?page=wpac-reaction-settings3.2831.08

Server storage [IO: ▲3.52MB] [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: 99 new files
Database: 2 new tables, 8 new options
New tables
wp_wpac_reactions_system
wp_wpac_like_system
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_wpacpopularposts_widget
theysaidso_admin_options
wpac_db_version
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPAC Social Tools - Like, React & Share
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲21713.61 ▼1.075.67 ▲3.9572.36 ▲32.71
Dashboard /wp-admin2,238 ▲505.80 ▲0.8997.61 ▼12.6141.83 ▲0.74
Posts /wp-admin/edit.php2,124 ▲352.01 ▼0.0534.87 ▼6.4033.87 ▼3.34
Add New Post /wp-admin/post-new.php1,543 ▲2322.97 ▼0.30665.73 ▲72.4556.63 ▼6.16
Media Library /wp-admin/upload.php1,423 ▲414.20 ▲0.07105.31 ▲8.3149.54 ▲6.85
WPAC Settings /wp-admin/admin.php?page=wpac-settings9652.0623.8133.28
Like/Dislike /wp-admin/admin.php?page=wpac-button-settings9192.0622.4028.33
Sharing /wp-admin/admin.php?page=wpac-sharing-settings8822.0625.7927.77
Reactions /wp-admin/admin.php?page=wpac-reaction-settings9572.0622.0729.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_wpac_like_system
    • wp_wpac_reactions_system
  • Zombie WordPress options detected upon uninstall: 8 options
    • theysaidso_admin_options
    • widget_recent-posts
    • wpac_db_version
    • widget_wpacpopularposts_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

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)
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wpac-reaction-settings
    • > Notice in wp-content/plugins/wpac-like-system/inc/setting-fields/reactions.php+77
    Undefined variable: position_style

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wpac-like-system/inc/shortcodes.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpac-like-system/inc/setting-parts/menu-pages.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpac-like-system/inc/scripts.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpac-like-system/inc/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wpac-like-system/inc/btns.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wpac-like-system/inc/static-functions.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wpac-like-system/inc/reactions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpac-like-system/inc/setting-parts/register-settings.php:309
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wpac-like-system/inc/widgets/wpac-popular-posts.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: post like, dislike, reactions, like, social sharing

wpac-like-system/wpac-like-system.php 92% from 13 tests

The primary PHP file in "WPAC Social Tools - Like, React & Share" version 3.0.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected26,268 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,299
CSS62,097335,142
Sass21513344,800
LESS21510674,746
PHP242551922,146
JavaScript3128135

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity18.00
▷ Minimum class complexity15.00
▷ Maximum class complexity21.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions69
▷ Named functions69100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/emoji_like_1.png2.36KB2.01KB▼ 14.87%
assets/img/emoji_laugh_1.png2.08KB1.76KB▼ 15.66%
assets/img/emoji_sad_1.png2.07KB1.82KB▼ 12.13%
assets/img/emoji_love_1.png2.18KB1.85KB▼ 15.43%
assets/img/emoji_shocked_1.png2.00KB1.77KB▼ 11.70%