84% rigorous-social-share

Code Review | Rigororus Social Share

WordPress plugin Rigororus Social Share scored84%from 54 tests.

About plugin

  • Plugin page: rigorous-social-s...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.7
  • WordPress version: 6.3.1
  • First release: Feb 25, 2017
  • Latest release: Mar 16, 2021
  • Number of updates: 7
  • Update frequency: every 211.6 days
  • Top authors: WpGaint (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,011 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.06MB] [CPU: ▼0.15ms] Passed 4 tests

Server-side resources used by Rigororus Social Share
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.26 ▲1.10
Dashboard /wp-admin3.36 ▲0.0648.34 ▼2.86
Posts /wp-admin/edit.php3.41 ▲0.0645.69 ▼3.22
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.01 ▲5.97
Media Library /wp-admin/upload.php3.28 ▲0.0635.22 ▲4.38

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Rigororus Social Share
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7614.73 ▲0.141.93 ▲0.2443.53 ▲0.09
Dashboard /wp-admin2,225 ▲345.02 ▼0.8599.71 ▼2.5639.26 ▼5.11
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0836.54 ▼3.7433.52 ▼4.52
Add New Post /wp-admin/post-new.php6,244 ▲4,72521.62 ▼1.67898.92 ▲263.4173.68 ▲15.30
Media Library /wp-admin/upload.php1,404 ▲164.17 ▼0.0294.83 ▼1.4439.55 ▼8.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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

SRP 50% from 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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/rigorous-social-share/rigorous-social-share.php:18
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/rigorous-social-share/inc/backend/main-page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: share counter, social network, social icons, social share counter, social network share...

rigorous-social-share/rigorous-social-share.php Passed 13 tests

The primary PHP file in "Rigororus Social Share" version 1.0.1 is used by WordPress to initiate all plugin functionality
77 characters long description:
This plugin allow to add social share button in post and page of you website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,166 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
SVG100504
PHP311243387
CSS27710275

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.33
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/demo-1.png5.40KB2.77KB▼ 48.66%
images/demo-3.png3.75KB1.82KB▼ 51.43%
images/demo-2.png3.11KB1.73KB▼ 44.44%