79% sharedom

Code Review | Sharedom

WordPress plugin Sharedom scored79%from 54 tests.

About plugin

  • Plugin page: sharedom
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 6.3.1
  • First release: Mar 20, 2014
  • Latest release: Mar 11, 2019
  • Number of updates: 46
  • Update frequency: every 39.5 days
  • Top authors: kunalnagar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /994 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Sharedom
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.02 ▲2.12
Dashboard /wp-admin3.35 ▲0.0144.63 ▼14.68
Posts /wp-admin/edit.php3.47 ▲0.1147.97 ▲1.30
Add New Post /wp-admin/post-new.php5.95 ▲0.0783.13 ▼4.38
Media Library /wp-admin/upload.php3.28 ▲0.0534.10 ▲2.42

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Sharedom
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲14713.64 ▼0.746.74 ▲5.0437.87 ▼1.46
Dashboard /wp-admin2,213 ▲274.85 ▼0.13101.87 ▼3.4339.37 ▼3.32
Posts /wp-admin/edit.php2,090 ▲12.00 ▼0.0136.89 ▲2.8733.81 ▼1.20
Add New Post /wp-admin/post-new.php1,518 ▼1617.52 ▼5.79661.14 ▼17.6649.81 ▼3.24
Media Library /wp-admin/upload.php1,392 ▲104.19 ▲0.0496.95 ▼9.5041.74 ▼8.54

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 does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sharedom/admin/partials/sharedom-admin-display.php
    • > /wp-content/plugins/sharedom/public/partials/sharedom-public-display.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/sharedom/public/partials/sharedom-public-display.php on line 17
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/sharedom/public/partials/sharedom-public-display.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sharedom/public/partials/sharedom-public-display.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sharedom/public/partials/sharedom-public-display.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sharedom/public/partials/sharedom-public-display.php on line 17
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/sharedom/public/partials/sharedom-public-display.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: design, responsive, share, flat, googleplus...

sharedom/sharedom.php Passed 13 tests

Analyzing the main PHP file in "Sharedom" version 2.0.0
83 characters long description:
Responsive sharing buttons for sharing current URL to Facebook, Twitter and Google+

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
Everything looks great! No dangerous files found in this plugin2,204 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS6961931,550
SVG100414
PHP12117518206
JavaScript272720
Markdown112014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.29
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.08
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin