78% little-social

Code Review | LITTLE Social

WordPress plugin LITTLE Social scored78%from 54 tests.

About plugin

  • Plugin page: little-social
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Mar 17, 2017
  • Latest release: May 29, 2019
  • Number of updates: 22
  • Update frequency: every 36.3 days
  • Top authors: wearelittle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /906 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.64ms] Passed 4 tests

An overview of server-side resources used by LITTLE Social
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.69 ▲1.14
Dashboard /wp-admin3.41 ▲0.0651.42 ▼13.65
Posts /wp-admin/edit.php3.52 ▲0.1650.79 ▼0.26
Add New Post /wp-admin/post-new.php6.01 ▲0.1287.94 ▼13.78
Media Library /wp-admin/upload.php3.33 ▲0.1039.89 ▲5.74
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=little_social3.3349.55
Add New /wp-admin/post-new.php?post_type=little_social3.4557.52
All Social Posts /wp-admin/edit.php?post_type=little_social3.3739.75

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

Browser metrics Passed 4 tests

A check of browser resources used by LITTLE Social
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲19113.99 ▼0.678.77 ▲6.9242.59 ▲1.38
Dashboard /wp-admin2,272 ▲694.88 ▲0.02112.82 ▲8.9542.53 ▲0.16
Posts /wp-admin/edit.php2,151 ▲512.04 ▲0.0535.57 ▼4.4431.61 ▼6.10
Add New Post /wp-admin/post-new.php1,573 ▲4223.34 ▲0.32684.15 ▲32.9261.96 ▲13.48
Media Library /wp-admin/upload.php1,448 ▲484.22 ▼0.17103.94 ▲2.6644.30 ▼3.26
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=little_social1,3702.2933.1332.21
Add New /wp-admin/post-new.php?post_type=little_social2,2757.73178.3070.21
All Social Posts /wp-admin/edit.php?post_type=little_social1,1321.9534.8632.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/little-social/public/partials/plugin-name-public-display.php
    • > /wp-content/plugins/little-social/admin/partials/little-social-media-admin-display.php
  • 16× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/little-social/social/SocialRepository.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/little-social/social/models/Linkedin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/little-social/social/models/FBPost.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/little-social/social/LinkedinConnector.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/little-social/includes/little-social-media-activator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/little-social/social/models/Tweet.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/little-social/social/InstagramConnector.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/little-social/social/TwitterConnector.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/little-social/social/FacebookConnector.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/little-social/includes/little-social-media-deactivator.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === little-social === )
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5 in little-social/assets to your readme.txt
The official readme.txt might help

little-social/little-social-media.php 92% from 13 tests

"LITTLE Social" version 1.4.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("little-social.php" instead of "little-social-media.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,017 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP307806421,953
JavaScript2263164
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.44
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods197
▷ Static methods00.00%
▷ Public methods18995.94%
▷ Protected methods31.52%
▷ Private methods52.54%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin