83% social-tools

Code Review | Social Tools

WordPress plugin Social Tools scored83%from 54 tests.

About plugin

  • Plugin page: social-tools
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 5.0.2-5.7
  • WordPress version: 6.3.1
  • First release: Mar 5, 2019
  • Latest release: Mar 10, 2021
  • Number of updates: 5
  • Update frequency: every 147.8 days
  • Top authors: desishe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /932 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼4.14ms] Passed 4 tests

A check of server-side resources used by Social Tools
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1645.32 ▲4.09
Dashboard /wp-admin3.47 ▲0.1645.88 ▼0.60
Posts /wp-admin/edit.php3.58 ▲0.2342.02 ▼5.83
Add New Post /wp-admin/post-new.php6.05 ▲0.1680.41 ▼13.02
Media Library /wp-admin/upload.php3.39 ▲0.1636.27 ▲2.91

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_adswst_facebook_likebox_widget
widget_theysaidso_widget
db_upgraded
widget_adswst_social_icons_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_adswst_instagram_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Social Tools
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.69 ▲0.481.63 ▼0.1342.31 ▲0.28
Dashboard /wp-admin2,198 ▲185.58 ▼0.0883.52 ▼5.5136.27 ▼2.71
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0635.32 ▼3.0431.14 ▲0.10
Add New Post /wp-admin/post-new.php1,529 ▲323.01 ▼0.03601.99 ▲3.1953.21 ▲6.37
Media Library /wp-admin/upload.php1,403 ▼04.17 ▼0.0296.90 ▼5.8748.66 ▲3.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_adswst_instagram_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_adswst_social_icons_widget
    • widget_adswst_facebook_likebox_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/social-tools/alids-social-tools.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-tools/widgets/widget-facebook.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-tools/core/setup.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-tools/widgets/widget-instagram.php:6
    • > PHP Warning
      Use of undefined constant ADSWST_PATH - assumed 'ADSWST_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-tools/core/core.php on line 4
    • > PHP Warning
      require(ADSWST_PATHwidgets/widget-facebook.php): failed to open stream: No such file or directory in wp-content/plugins/social-tools/core/core.php on line 4
    • > PHP Fatal error
      require(): Failed opening required 'ADSWST_PATHwidgets/widget-facebook.php' (include_path='.:/usr/share/php') in wp-content/plugins/social-tools/core/core.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-tools/widgets/widget-social-icons.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-tools/core/init.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
Please take inspiration from this readme.txt

social-tools/alids-social-tools.php 77% from 13 tests

The entry point to "Social Tools" version 1.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: Required version number formatted incorrectly (ex. "7.0" instead of "WP 5.0.2")
  • Main file name: The principal plugin file should be the same as the plugin slug ("social-tools.php" instead of "alids-social-tools.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected897 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP715655711
CSS6918167
SVG17019

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity31.67
▷ Minimum class complexity13.00
▷ Maximum class complexity41.00
Average method complexity6.75
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin