68% tinysocial

Code Review | tinySocial

WordPress plugin tinySocial scored68%from 54 tests.

About plugin

  • Plugin page: tinysocial
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Jul 12, 2015
  • Latest release: Nov 5, 2018
  • Number of updates: 17
  • Update frequency: every 71.4 days
  • Top authors: deployer (88.24%)ideag (17.65%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /2,478 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼1.14MB] [CPU: ▼49.86ms] Passed 4 tests

An overview of server-side resources used by tinySocial
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.6313.69 ▼33.10
Dashboard /wp-admin2.88 ▼0.4319.70 ▼37.18
Posts /wp-admin/edit.php2.88 ▼0.4817.14 ▼43.66
Add New Post /wp-admin/post-new.php2.88 ▼3.0120.95 ▼85.51
Media Library /wp-admin/upload.php2.88 ▼0.3514.68 ▼27.93
tinySocial /wp-admin/options-general.php?page=tinysocial2.8817.75

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for tinySocial
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.59 ▼0.799.99 ▲7.7938.81 ▼1.26
Dashboard /wp-admin2,210 ▲224.82 ▼1.09105.22 ▼16.7237.70 ▼16.88
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0134.68 ▼2.9531.50 ▼2.16
Add New Post /wp-admin/post-new.php1,517 ▼1717.47 ▼5.78629.77 ▼35.1850.72 ▼0.69
Media Library /wp-admin/upload.php1,392 ▲44.16 ▼0.02100.39 ▼11.0341.70 ▼6.87
tinySocial /wp-admin/options-general.php?page=tinysocial9762.0324.0240.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method tinySocial::hide_icon() should not be called statically
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=tinysocial
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method tinySocial::hide_icon() should not be called statically

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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/tinysocial/tinysocial.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
7 plugin tags: social networks, share links, google plus, facebook, twitter...

tinysocial/tinysocial.php Passed 13 tests

The primary PHP file in "tinySocial" version 1.3.2 is used by WordPress to initiate all plugin functionality
87 characters long description:
Easy way to insert lightweight social sharing links to your posts/pages via shortcodes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin668 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP25135591
SVG140046
JavaScript11024
CSS1107

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity45.50
▷ Minimum class complexity35.00
▷ Maximum class complexity56.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods2896.55%
▷ Public methods2586.21%
▷ Protected methods00.00%
▷ Private methods413.79%
Functions0
▷ Named functions00.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