77% easy-social-signal-counter

Code Review | Easy Social Signal Counter

WordPress plugin Easy Social Signal Counter scored77%from 54 tests.

About plugin

  • Plugin page: easy-social-signa...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Dec 29, 2014
  • Latest release: Jan 1, 2015
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: jayasrinagrale (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,481 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.16ms] Passed 4 tests

An overview of server-side resources used by Easy Social Signal Counter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.95 ▼3.82
Dashboard /wp-admin3.33 ▲0.0256.17 ▲3.30
Posts /wp-admin/edit.php3.38 ▲0.0251.87 ▼1.08
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.13 ▼7.05
Media Library /wp-admin/upload.php3.25 ▲0.0242.68 ▲4.60
Easy Social Signal Counter /wp-admin/options-general.php?page=easy-social-signal-counter/easy-social-signal-counter.php3.2033.69

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Social Signal Counter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.19 ▼0.162.17 ▲0.3845.61 ▲1.94
Dashboard /wp-admin2,199 ▲225.56 ▲0.0392.53 ▲1.8739.64 ▲0.81
Posts /wp-admin/edit.php2,107 ▲71.99 ▲0.0138.67 ▼1.5838.84 ▲2.56
Add New Post /wp-admin/post-new.php1,529 ▲122.81 ▼0.26660.22 ▲33.6760.24 ▲8.07
Media Library /wp-admin/upload.php1,404 ▲14.18 ▼0.1395.82 ▼3.3046.17 ▼1.04
Easy Social Signal Counter /wp-admin/options-general.php?page=easy-social-signal-counter/easy-social-signal-counter.php1,5762.3426.8135.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=easy-social-signal-counter/easy-social-signal-counter.php
    • > Notice in wp-content/plugins/easy-social-signal-counter/easy-social-signal-counter.php+86
    Undefined index: pageno
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-social-signal-counter/easy-social-signal-counter.php
    • > Warning in wp-content/plugins/easy-social-signal-counter/easy-social-signal-counter.php+38
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
    • > GET request to /wp-admin/options-general.php?page=easy-social-signal-counter/easy-social-signal-counter.php
    • > Warning in wp-content/plugins/easy-social-signal-counter/easy-social-signal-counter.php+25
    file_get_contents(http://api.ak.facebook.com/restserver.php?v=1.0&method=fql.query&query=select%20url,%20total_count%20from%20link_stat%20where%20url%20in%20('http://wp.com/index.php/2023/09/01/hello-world/')&format=xml): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
    • > GET request to /wp-admin/options-general.php?page=easy-social-signal-counter/easy-social-signal-counter.php
    • > Notice in wp-content/plugins/easy-social-signal-counter/easy-social-signal-counter.php+27
    Trying to get property 'link_stat' of non-object
    • > GET request to /wp-admin/options-general.php?page=easy-social-signal-counter/easy-social-signal-counter.php
    • > Notice in wp-content/plugins/easy-social-signal-counter/easy-social-signal-counter.php+27
    Trying to get property 'total_count' of non-object
    • > GET request to /wp-admin/options-general.php?page=easy-social-signal-counter/easy-social-signal-counter.php
    • > Warning in wp-content/plugins/easy-social-signal-counter/easy-social-signal-counter.php+38
    file_get_contents(http://urls.api.twitter.com/1/urls/count.json?url=http://wp.com/index.php/2023/09/01/hello-world/): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-social-signal-counter/easy-social-signal-counter.php
    • > Notice in wp-content/plugins/easy-social-signal-counter/easy-social-signal-counter.php+73
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=easy-social-signal-counter/easy-social-signal-counter.php
    • > Warning in wp-content/plugins/easy-social-signal-counter/easy-social-signal-counter.php+69
    file_get_contents(http://api.pinterest.com/v1/urls/count.json?callback%20&url=http://wp.com/index.php/2023/09/01/hello-world/): failed to open stream: HTTP request failed! HTTP/1.0 426 Upgrade Required

    • > GET request to /wp-admin/options-general.php?page=easy-social-signal-counter/easy-social-signal-counter.php
    • > Warning in wp-content/plugins/easy-social-signal-counter/easy-social-signal-counter.php+49
    file_get_contents(https://plusone.google.com/_/+1/fastbutton?url=http://wp.com/index.php/2023/09/01/hello-world/): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-social-signal-counter/easy-social-signal-counter.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI found ("#")
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

easy-social-signal-counter/easy-social-signal-counter.php 85% from 13 tests

The main PHP script in "Easy Social Signal Counter" version 0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/lang")
  • Description: Keep the plugin description shorter than 140 characters (currently 451 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin180 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13519180

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected