89% naked-social-share

Code Review | Naked Social Share

WordPress plugin Naked Social Share scored89%from 54 tests.

About plugin

  • Plugin page: naked-social-share
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5.2
  • WordPress version: 6.3.1
  • First release: Apr 11, 2015
  • Latest release: Oct 25, 2020
  • Number of updates: 73
  • Update frequency: every 27.7 days
  • Top authors: NoseGraze (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

200+ active /11,802 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Naked Social Share
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.97 ▼1.15
Dashboard /wp-admin3.34 ▲0.0446.85 ▼2.00
Posts /wp-admin/edit.php3.39 ▲0.0449.16 ▼4.79
Add New Post /wp-admin/post-new.php5.92 ▲0.0495.37 ▼1.73
Media Library /wp-admin/upload.php3.27 ▲0.0434.67 ▼1.45
Naked Social Share /wp-admin/options-general.php?page=naked-social-share3.2432.81

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Naked Social Share
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲18213.98 ▼0.326.09 ▲4.1938.79 ▼6.75
Dashboard /wp-admin2,210 ▲224.85 ▲0.02107.67 ▼7.4040.61 ▼4.84
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0539.47 ▲0.5833.66 ▼0.49
Add New Post /wp-admin/post-new.php1,542 ▲2323.32 ▲0.12652.86 ▼26.5069.45 ▲15.96
Media Library /wp-admin/upload.php1,389 ▲14.22 ▲0.0495.82 ▼18.4443.63 ▼2.62
Naked Social Share /wp-admin/options-general.php?page=naked-social-share9922.2233.5445.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • naked_social_share_settings
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Everything seems fine, however this is by no means an exhaustive test

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: social share, stumbleupon, pinterest, twitter, social...

naked-social-share/naked-social-share.php 85% from 13 tests

The primary PHP file in "Naked Social Share" version 1.5.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("/lang")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,480 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP83117301,063
Sass2257132
PO File13333111
CSS441689
JavaScript422585

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity42.50
▷ Minimum class complexity9.00
▷ Maximum class complexity76.00
Average method complexity6.19
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected