10% wanapost-several-social-sharing

Code Review | Wanapost Several Social Sharing

WordPress plugin Wanapost Several Social Sharing scored10%from 54 tests.

About plugin

  • Plugin page: wanapost-several-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6
  • WordPress version: 6.3.1
  • First release: Aug 31, 2016
  • Latest release: Sep 8, 2016
  • Number of updates: 105
  • Update frequency: every 0.1 days
  • Top authors: belaadel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /868 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/wanapost-several-social-sharing/index.php+22
    Constant AUTOSAVE_INTERVAL already defined

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.16ms] Passed 4 tests

A check of server-side resources used by Wanapost Several Social Sharing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0323.44 ▼19.92
Dashboard /wp-admin3.35 ▲0.0446.94 ▲2.58
Posts /wp-admin/edit.php3.40 ▲0.0449.02 ▲0.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0496.08 ▲4.45
Media Library /wp-admin/upload.php3.27 ▲0.0436.10 ▲3.71
Wanapost SeveralSocial Sharing /wp-admin/options-general.php?page=wanapost-several-social-sharing3.2432.20

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 73 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
wanapost-several-social-sharing_pluign_version
widget_recent-comments
can_compress_scripts
wanapost-several-social-sharing
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Wanapost Several Social Sharing
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.25 ▼1.121.74 ▼0.0741.21 ▼2.91
Dashboard /wp-admin2,210 ▲255.85 ▲0.9799.23 ▼29.9938.44 ▼9.77
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0347.29 ▲5.5736.17 ▲1.13
Add New Post /wp-admin/post-new.php1,537 ▲423.26 ▲0.02593.41 ▼125.7555.77 ▼6.99
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.05102.04 ▼5.6340.81 ▼1.87
Wanapost SeveralSocial Sharing /wp-admin/options-general.php?page=wanapost-several-social-sharing2,1202.9840.9770.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • wanapost-several-social-sharing
    • wanapost-several-social-sharing_pluign_version

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wanapost-several-social-sharing
    • > Warning in wp-content/plugins/wanapost-several-social-sharing/includes/plugin.php+24
    Illegal string offset 'load_static'
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wanapost-several-social-sharing
    • > Notice in wp-content/plugins/wanapost-several-social-sharing/includes/plugin.php+30
    Array to string conversion
    • > GET request to /wp-admin/options-general.php?page=wanapost-several-social-sharing
    • > Warning in wp-content/plugins/wanapost-several-social-sharing/includes/plugin.php+27
    Illegal string offset 'wanapost_several_social_options'
    • > GET request to /wp-admin/options-general.php?page=wanapost-several-social-sharing
    • > Warning in wp-content/plugins/wanapost-several-social-sharing/includes/plugin.php+30
    Illegal string offset 'auto_add_post_types'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wanapost-several-social-sharing
    • > Notice in wp-content/plugins/wanapost-several-social-sharing/includes/settings-page.php+36
    Undefined index: social_icon_position
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wanapost-several-social-sharing
    • > Notice in wp-content/plugins/wanapost-several-social-sharing/includes/settings-page.php+68
    Undefined index: pinterest_blank_image
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wanapost-several-social-sharing
    • > Notice in wp-content/plugins/wanapost-several-social-sharing/includes/settings-page.php+82
    Undefined index: background_icon_size
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wanapost-several-social-sharing
    • > Notice in wp-content/plugins/wanapost-several-social-sharing/includes/settings-page.php+92
    Undefined index: background_color_size
  • 101 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wanapost-several-social-sharing
    • > Notice in wp-content/plugins/wanapost-several-social-sharing/includes/settings-page.php+101
    Undefined index: background_border_radius
    • > GET request to /wp-admin/options-general.php?page=wanapost-several-social-sharing
    • > Notice in wp-content/plugins/wanapost-several-social-sharing/includes/settings-page.php+146
    Undefined index: wanapost_username
    • > GET request to /wp-admin/options-general.php?page=wanapost-several-social-sharing
    • > Notice in wp-content/plugins/wanapost-several-social-sharing/includes/settings-page.php+159
    Undefined index: wanapost_public_key
    • > GET request to /wp-admin/options-general.php?page=wanapost-several-social-sharing
    • > Notice in wp-content/plugins/wanapost-several-social-sharing/includes/settings-page.php+166
    Undefined index: wanapost_private_key

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention: You can look at the official readme.txt

wanapost-several-social-sharing/index.php 85% from 13 tests

The principal PHP file in "Wanapost Several Social Sharing" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 288 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wanapost-several-social-sharing.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,366 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP64224668
PO File3162324399
CSS321267
JavaScript20032

PHP code Passed 2 tests

An short overview of 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.30
Average class complexity40.00
▷ Minimum class complexity5.00
▷ Maximum class complexity75.00
Average method complexity7.50
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
50 PNG files occupy 0.37MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/icons/yummly_h.png3.42KB1.07KB▼ 68.62%
static/icons/evernote_h.png0.82KB0.65KB▼ 19.88%
static/icons/email_h.png0.50KB0.45KB▼ 9.36%
static/icons/yahoo_h.png0.57KB0.50KB▼ 12.24%
static/icons/wanapost0_h.png0.47KB0.75KB0.00%