72% smartarget-follow-us

Code Review | Smartarget Follow Us

WordPress plugin Smartarget Follow Us scored72%from 54 tests.

About plugin

  • Plugin page: smartarget-follow-us
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 18, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 9
  • Update frequency: every 69.9 days
  • Top authors: erezs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /596 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.38ms] Passed 4 tests

Analyzing server-side resources used by Smartarget Follow Us
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /19.94 ▲16.433,294,155.87 ▲3,294,112.14
Dashboard /wp-admin3.41 ▲0.0651.93 ▼4.22
Posts /wp-admin/edit.php3.53 ▲0.1354.63 ▲2.16
Add New Post /wp-admin/post-new.php6.01 ▲0.0889.59 ▼13.50
Media Library /wp-admin/upload.php3.34 ▲0.0638.87 ▼1.95
Smartarget Follow Us /wp-admin/options-general.php?page=smartarget_social_follow_bar3.3145.72

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Smartarget Follow Us
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲13521.00 ▲6.398.08 ▲6.3940.37 ▼5.25
Dashboard /wp-admin2,205 ▲2810.64 ▲5.05159.69 ▲64.7236.96 ▼7.78
Posts /wp-admin/edit.php2,119 ▲167.24 ▲5.25110.39 ▲69.6133.64 ▼4.31
Add New Post /wp-admin/post-new.php1,694 ▲16627.66 ▲4.69743.07 ▼11.9857.48 ▼9.23
Media Library /wp-admin/upload.php1,407 ▲49.49 ▲5.28178.74 ▲69.2345.33 ▼2.87
Smartarget Follow Us /wp-admin/options-general.php?page=smartarget_social_follow_bar1,8229.12154.3187.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% 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
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=smartarget_social_follow_bar
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=smartarget_social_follow_bar
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/smartarget-follow-us/public/partials/smartarget-social-follow-bar-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_url() in wp-content/plugins/smartarget-follow-us/admin/partials/smartarget-social-follow-bar-admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: pinterest, instagram plugin, youtube, followers, facebook...

smartarget-follow-us/smartarget-social-follow-bar.php 85% from 13 tests

The main PHP file in "Smartarget Follow Us" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("smartarget-follow-us.php" instead of "smartarget-social-follow-bar.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin430 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12130522225
JavaScript351,397205
CSS1040

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin