10% social-hashtags

Code Review | Social Hashtags

WordPress plugin Social Hashtags scored10%from 54 tests.

About plugin

  • Plugin page: social-hashtags
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jun 26, 2013
  • Latest release: Feb 14, 2015
  • Number of updates: 8
  • Update frequency: every 74.8 days
  • Top authors: shanaver (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active /6,498 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/social-hashtags/social_hashtag.php+146
    Invalid argument supplied for foreach()

Server metrics [RAM: ▼1.02MB] [CPU: ▼39.27ms] Passed 4 tests

Analyzing server-side resources used by Social Hashtags
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.96 ▼0.5116.07 ▼23.59
Dashboard /wp-admin2.99 ▼0.3122.18 ▼24.58
Posts /wp-admin/edit.php3.00 ▼0.3618.66 ▼33.94
Add New Post /wp-admin/post-new.php3.00 ▼2.8918.57 ▼74.95
Media Library /wp-admin/upload.php3.00 ▼0.2418.06 ▼13.82
Add New /wp-admin/post-new.php?post_type=social_hashtag3.0016.62
Social Hashtags /wp-admin/edit.php?post_type=social_hashtag3.0016.36
Social Hashtag Tags /wp-admin/edit-tags.php?taxonomy=social_hashtag_tags&post_type=social_hashtag3.0017.64
Social Hashtag Categories /wp-admin/edit-tags.php?taxonomy=social_hashtag_categories&post_type=social_hashtag3.0017.53
Social Hashtag /wp-admin/options-general.php?page=social_hashtag3.0015.72

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Hashtags
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11113.26 ▼1.175.42 ▲3.6245.51 ▼4.72
Dashboard /wp-admin2,247 ▲625.09 ▲0.18107.20 ▲1.0639.89 ▼3.85
Posts /wp-admin/edit.php2,130 ▲412.02 ▲0.0140.91 ▲0.5435.18 ▼5.83
Add New Post /wp-admin/post-new.php1,562 ▲2023.22 ▲5.10654.35 ▼8.8261.16 ▼5.48
Media Library /wp-admin/upload.php1,429 ▲414.22 ▲0.0493.77 ▼4.1840.52 ▼2.57
Add New /wp-admin/post-new.php?post_type=social_hashtag2,5237.95194.6872.54
Social Hashtags /wp-admin/edit.php?post_type=social_hashtag1,1101.9536.8531.04
Social Hashtag Tags /wp-admin/edit-tags.php?taxonomy=social_hashtag_tags&post_type=social_hashtag1,2752.1326.8926.85
Social Hashtag Categories /wp-admin/edit-tags.php?taxonomy=social_hashtag_categories&post_type=social_hashtag1,3002.1527.3728.63
Social Hashtag /wp-admin/options-general.php?page=social_hashtag8752.0726.7526.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/social-hashtags/lib/posttypes.php+12
    Undefined property: SOCIAL_HASHTAG_CACHE::$cpt_slug
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=social_hashtag
    • > Notice in wp-content/plugins/social-hashtags/social_hashtag-options.php+46
    Undefined property: SOCIAL_HASHTAG_CACHE::$cpt_slug

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/social-hashtags/social_hashtag-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/social-hashtags/social_hashtag.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/social-hashtags/lib/shortcodes.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/social-hashtags/lib/archive-social_hashtag.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-hashtags/lib/posttypes.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
9 plugin tags: instagram, photos, hashtags, teleportd, twitter...

social-hashtags/social_hashtag.php 85% from 13 tests

This is the main PHP file of "Social Hashtags" version 3.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("social-hashtags.php" instead of "social_hashtag.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 324 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,680 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP82261121,636
Markdown120031
CSS111013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity19.67
▷ Minimum class complexity5.00
▷ Maximum class complexity70.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.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
There are no PNG files in this plugin