84% instashare

Code Review | InstaShare Social Sharing

WordPress plugin InstaShare Social Sharing scored84%from 54 tests.

About plugin

  • Plugin page: instashare
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.7
  • WordPress version: 6.3.1
  • First release: May 23, 2018
  • Latest release: Jul 22, 2018
  • Number of updates: 6
  • Update frequency: every 10.0 days
  • Top authors: siamcomm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /679 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.31ms] Passed 4 tests

Analyzing server-side resources used by InstaShare Social Sharing
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.60 ▼2.71
Dashboard /wp-admin3.36 ▲0.0154.04 ▼7.92
Posts /wp-admin/edit.php3.47 ▲0.1151.84 ▲3.21
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.87 ▼20.19
Media Library /wp-admin/upload.php3.28 ▲0.0535.04 ▼2.43

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

InstaShare Social Sharing: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.70 ▼0.495.81 ▲3.7543.40 ▲0.67
Dashboard /wp-admin2,207 ▲195.77 ▲0.88102.55 ▼0.6838.04 ▼0.24
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0335.96 ▼8.3232.36 ▼5.09
Add New Post /wp-admin/post-new.php1,518 ▼1023.43 ▲0.11643.31 ▲25.7849.35 ▼12.36
Media Library /wp-admin/upload.php1,392 ▲74.31 ▲0.14101.84 ▲0.2645.66 ▲0.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/instashare/public/partials/instashare-public-display.php
    • > /wp-content/plugins/instashare/admin/partials/instashare-admin-display.php

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: social, sharing

instashare/instashare.php Passed 13 tests

"InstaShare Social Sharing" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
135 characters long description:
This plugin adds Social Sharing buttons to the bottom of content in pages and posts, so your visitors can share your website's content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected293 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12128547208
CSS216861
Markdown114018
JavaScript24546

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.14
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.32
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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