67% ss-share

Code Review | Ss share

WordPress plugin Ss share scored 67% from 54 tests.

About plugin

  • Plugin page: ss-share
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.1
  • WordPress version: 6.3.1
  • First release: Dec 12, 2020
  • Latest release: Oct 14, 2021
  • Number of updates: 8
  • Update frequency: every 38.2 days
  • Top authors: mirakmalsulton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 423 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.92MB] [CPU: ▼51.95ms] Passed 4 tests

Server-side resources used by Ss share
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.79 ▼36.71
Dashboard /wp-admin2.09 ▼1.215.75 ▼42.34
Posts /wp-admin/edit.php2.10 ▼1.267.65 ▼35.69
Add New Post /wp-admin/post-new.php2.09 ▼3.797.10 ▼93.05
Media Library /wp-admin/upload.php2.09 ▼1.135.22 ▼28.96

Server storage [IO: ▲0.03MB] [DB: ▲0.33MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
ss-share
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Ss share
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲13213.20 ▼1.181.95 ▼0.1738.63 ▼4.46
Dashboard /wp-admin2,229 ▲405.86 ▲1.00109.51 ▼12.9184.19 ▲40.41
Posts /wp-admin/edit.php2,127 ▲382.01 ▼0.0338.36 ▲4.2935.42 ▼0.01
Add New Post /wp-admin/post-new.php1,547 ▲517.52 ▼0.56703.63 ▲103.1854.08 ▼3.58
Media Library /wp-admin/upload.php1,426 ▲384.11 ▼0.06118.54 ▲25.1043.85 ▲2.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ss-share-admin-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ss-share/modules/admin/views/main.php
    • > /wp-content/plugins/ss-share/modules/front/views/after-content.php
  • 27× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant SS_SHARE_TEXT_DOMAIN - assumed 'SS_SHARE_TEXT_DOMAIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/ss-share/modules/front/views/right.php on line 13
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ss-share/modules/admin/views/main.php on line 60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ss-share/modules/front/views/left.php:14
    • > PHP Warning
      Use of undefined constant SS_SHARE_TEXT_DOMAIN - assumed 'SS_SHARE_TEXT_DOMAIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/ss-share/modules/front/views/after-content.php on line 13
    • > PHP Notice
      Undefined variable: params in wp-content/plugins/ss-share/modules/admin/views/main.php on line 60
    • > PHP Notice
      Undefined variable: params in wp-content/plugins/ss-share/modules/admin/views/main.php on line 76
    • > PHP Fatal error
      Uncaught Error: Class 'ssShare\\modules\\common\\BaseModel' not found in wp-content/plugins/ss-share/modules/admin/AdminModel.php:8
    • > PHP Notice
      Undefined variable: params in wp-content/plugins/ss-share/modules/admin/views/main.php on line 11
    • > PHP Notice
      Undefined variable: params in wp-content/plugins/ss-share/modules/front/views/after-content.php on line 14
    • > PHP Notice
      Undefined variable: params in wp-content/plugins/ss-share/modules/admin/views/main.php on line 28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please a description for screenshot #0 in ss-share/assets to your readme.txt
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === ss-share === )
  • Screenshots: Please add an image for screenshot #1 (This is the first screen shot)
You can take inspiration from this readme.txt

ss-share/index.php 92% from 13 tests

"Ss share" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ss-share.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 detected661 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP1210223503
SVG76086
CSS217072

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity5.86
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2273.33%
▷ Protected methods00.00%
▷ Private methods826.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants430.77%
▷ Class constants969.23%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
WP/assets/icon-128x128.png1.04KB0.54KB▼ 47.92%