10% social-traffic-commando

Code Review | Social Traffic Commando

WordPress plugin Social Traffic Commando scored10%from 54 tests.

About plugin

  • Plugin page: social-traffic-co...
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2014
  • Latest release: Dec 6, 2014
  • Number of updates: 2
  • Update frequency: every 5.0 days
  • Top authors: Commando SEO (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,648 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Compile error in wp-content/plugins/social-traffic-commando/oo/external/linkedin/Linkedin.php+191
    Cannot unset $this

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.82ms] Passed 4 tests

A check of server-side resources used by Social Traffic Commando
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.76 ▼4.18
Dashboard /wp-admin3.31 ▲0.0043.04 ▼4.45
Posts /wp-admin/edit.php3.36 ▲0.0046.99 ▲0.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.19 ▼13.79
Media Library /wp-admin/upload.php3.23 ▲0.0032.60 ▼4.86

Server storage [IO: ▲3.93MB] [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: 202 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Social Traffic Commando
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.25 ▼1.141.89 ▼0.2243.36 ▼1.77
Dashboard /wp-admin2,203 ▲125.88 ▲1.02110.02 ▼4.6341.95 ▼3.25
Posts /wp-admin/edit.php2,092 ▲62.00 ▲0.0341.11 ▲5.3435.52 ▼1.09
Add New Post /wp-admin/post-new.php1,542 ▲918.25 ▼4.95638.04 ▼38.9958.49 ▲6.31
Media Library /wp-admin/upload.php1,388 ▼34.18 ▲0.0194.81 ▼6.3340.84 ▼3.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/social-traffic-commando/views/import.php
    • > /wp-content/plugins/social-traffic-commando/views/help.php
    • > /wp-content/plugins/social-traffic-commando/views/proxy-add.php
  • 28× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-traffic-commando/oo/STCQueue.php on line 4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/social-traffic-commando/views/account.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/social-traffic-commando/oo/STC.php:21
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/social-traffic-commando/views/twitter.php:21
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/social-traffic-commando/views/queue.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/social-traffic-commando/oo/STCQueue.php on line 4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/social-traffic-commando/views/add.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/social-traffic-commando/oo/STCTwitter.php on line 4
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/social-traffic-commando/oo/external/tcpdf/tcpdf.php on line 22149
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-traffic-commando/oo/STCProxy.php on line 4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
Please take inspiration from this readme.txt

social-traffic-commando/social-traffic-commando.php Passed 13 tests

The main PHP script in "Social Traffic Commando" version 1.2.4 is automatically included on every request by WordPress
39 characters long description:
Plugin for strategic social bookmarking

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Please make sure to remedy the following
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/social-traffic-commando/oo/external/facebook/fb_ca_chain_bundle.crt
      • wp-content/plugins/social-traffic-commando/oo/external/tcpdf/tcpdf.crt
66,758 lines of code in 131 files:
LanguageFilesBlank linesComment linesLines of code
PHP1193,22217,16257,433
CSS8128847,386
JavaScript35471941,710
SVG100229

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 5,189)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 479)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity83.66
▷ Minimum class complexity1.00
▷ Maximum class complexity5,189.00
Average method complexity6.69
▷ Minimum method complexity1.00
▷ Maximum method complexity479.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes99
▷ Abstract classes99.09%
▷ Concrete classes9090.91%
▷ Final classes00.00%
Methods1,461
▷ Static methods704.79%
▷ Public methods1,02770.29%
▷ Protected methods37725.80%
▷ Private methods573.90%
Functions167
▷ Named functions167100.00%
▷ Anonymous functions00.00%
Constants154
▷ Global constants12883.12%
▷ Class constants2616.88%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
38 PNG files occupy 0.26MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/images/flixya.png19.12KB9.87KB▼ 48.36%
views/images/soup.png7.54KB3.89KB▼ 48.45%
views/images/experienceproject.png4.34KB2.34KB▼ 46.19%
views/images/blog.png2.73KB2.70KB▼ 0.90%
views/images/jigsy.png11.10KB5.64KB▼ 49.19%