10% top-social-stories-free

Code Review | Top Social Stories Free

WordPress plugin Top Social Stories Free scored10%from 54 tests.

About plugin

  • Plugin page: top-social-storie...
  • Plugin version: 1.83
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Nov 30, 2014
  • Latest release: Dec 7, 2016
  • Number of updates: 109
  • Update frequency: every 6.8 days
  • Top authors: ginoplusio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,275 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/top-social-stories-free/top-stories.php+1040
    Function create_function() is deprecated

Server metrics [RAM: ▼1.49MB] [CPU: ▼55.13ms] Passed 4 tests

This is a short check of server-side resources used by Top Social Stories Free
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.51 ▼0.956.73 ▼34.63
Dashboard /wp-admin2.53 ▼0.817.70 ▼53.88
Posts /wp-admin/edit.php2.53 ▼0.828.85 ▼32.45
Add New Post /wp-admin/post-new.php2.53 ▼3.357.28 ▼99.57
Media Library /wp-admin/upload.php2.53 ▼0.706.92 ▼27.47
Top Social Stories /wp-admin/edit.php?page=top_stories_menu_analytics2.538.00
/wp-admin/admin.php?page=top_stories_facebook_config_page2.539.39
Top Stories Settings /wp-admin/options-general.php?page=top_stories_menu_settings2.537.09

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 30 new files
Database: 1 new table, 7 new options
New tables
wp_top_stories
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_top_stories_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Top Social Stories Free
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16813.58 ▼0.728.88 ▲6.9645.39 ▲0.54
Dashboard /wp-admin2,217 ▲294.84 ▼0.03106.15 ▼13.4941.98 ▼1.12
Posts /wp-admin/edit.php2,159 ▲702.04 ▲0.0238.13 ▼2.5236.95 ▲2.83
Add New Post /wp-admin/post-new.php1,539 ▲1023.34 ▲5.04653.73 ▲36.6750.38 ▼12.20
Media Library /wp-admin/upload.php1,396 ▲84.23 ▲0.0395.10 ▼11.5643.46 ▲0.80
Top Social Stories /wp-admin/edit.php?page=top_stories_menu_analytics1,1112.5729.2645.10
/wp-admin/admin.php?page=top_stories_facebook_config_page8622.1721.5123.14
Top Stories Settings /wp-admin/options-general.php?page=top_stories_menu_settings1,1511.6925.4731.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/top-social-stories-free/top-stories.php+1040
    Function create_function() is deprecated
  • Zombie tables detected upon uninstall: 1 table
    • wp_top_stories
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_top_stories_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=top_stories_menu_settings
    • > Deprecated in wp-content/plugins/top-social-stories-free/top-stories.php+1040
    Function create_function() is deprecated
    • > GET request to /wp-admin/edit.php?page=top_stories_menu_analytics
    • > Notice in wp-content/plugins/top-social-stories-free/top-stories.php+339
    Undefined variable: days

SRP 50% 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 trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/top-social-stories-free/widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/top-social-stories-free/charts.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/top-social-stories-free/widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Tags: There are too many tags (28 tag instead of maximum 10)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === top-social-stories-free === )
Please take inspiration from this readme.txt

top-social-stories-free/top-stories.php 85% from 13 tests

The principal PHP file in "Top Social Stories Free" v. 1.83 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("top-social-stories-free.php" instead of "top-stories.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 280 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,690 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP33651871,322
CSS2169257
JavaScript1328111

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions31100.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
21 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fire100.png0.79KB0.96KB0.00%
images/upm.png0.37KB0.26KB▼ 30.08%
images/fire1000.png0.80KB0.96KB0.00%
images/fb-admin-icon.png0.37KB0.27KB▼ 25.94%
images/ko.png0.68KB0.52KB▼ 23.81%