90% ocean-social-sharing

Code Review | Ocean Social Sharing

WordPress plugin Ocean Social Sharing scored 90% from 54 tests.

About plugin

  • Plugin page: ocean-social-sharing
  • Plugin version: 2.0.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 23, 2016
  • Latest release: Sep 6, 2023
  • Number of updates: 46
  • Update frequency: every 54.6 days
  • Top authors: oceanwp (71.74%)apprimit (30.43%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100,000+ active / 1,530,116 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.01MB] [CPU: ▼8.39ms] Passed 4 tests

This is a short check of server-side resources used by Ocean Social Sharing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.96 ▼8.37
Dashboard /wp-admin3.31 ▲0.0149.05 ▼3.35
Posts /wp-admin/edit.php3.36 ▲0.0149.79 ▲0.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.06 ▼21.89
Media Library /wp-admin/upload.php3.24 ▲0.0135.96 ▲2.24

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
ocean-social-sharing-version
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Ocean Social Sharing: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.82 ▲0.461.84 ▼0.0840.45 ▼9.14
Dashboard /wp-admin2,203 ▲155.84 ▲0.03111.49 ▼7.1441.05 ▼4.22
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0141.47 ▲0.7235.71 ▼6.20
Add New Post /wp-admin/post-new.php1,542 ▲718.63 ▼4.36588.97 ▼80.5854.59 ▼0.71
Media Library /wp-admin/upload.php1,391 ▼04.17 ▼0.0695.99 ▼3.1540.96 ▼4.87

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • ocean-social-sharing-version
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: social, oceanwp, share, social sharing, social share

ocean-social-sharing/ocean-social-sharing.php Passed 13 tests

This is the main PHP file of "Ocean Social Sharing" version 2.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
58 characters long description:
A simple plugin to add social share buttons to your posts.

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
No dangerous file extensions were detected2,140 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP4160293826
PO File4209264503
Sass18415361
CSS3107326
JavaScript435114
Markdown13010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods17
▷ Static methods211.76%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected