90% mb-social-sharing

Code Review | MB Social Sharing Plugin

WordPress plugin MB Social Sharing Plugin scored90%from 54 tests.

About plugin

  • Plugin page: mb-social-sharing
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1.1
  • WordPress version: 6.3.1
  • First release: Sep 16, 2016
  • Latest release: Jul 18, 2019
  • Number of updates: 19
  • Update frequency: every 54.5 days
  • Top authors: moumitab0027 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /545 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.48ms] Passed 4 tests

Server-side resources used by MB Social Sharing Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.88 ▲3.66
Dashboard /wp-admin3.33 ▼0.0148.02 ▼8.69
Posts /wp-admin/edit.php3.39 ▲0.0342.24 ▼1.87
Add New Post /wp-admin/post-new.php5.91 ▲0.0378.58 ▼14.43
Media Library /wp-admin/upload.php3.26 ▲0.0331.88 ▼0.93

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for MB Social Sharing Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.54 ▲0.141.64 ▲0.0444.75 ▲2.95
Dashboard /wp-admin2,211 ▲305.62 ▼0.0388.55 ▼11.4642.54 ▼1.14
Posts /wp-admin/edit.php2,124 ▲242.01 ▼0.0137.72 ▲2.5134.64 ▼1.76
Add New Post /wp-admin/post-new.php1,539 ▲1323.22 ▲0.06631.97 ▼80.8750.80 ▼6.56
Media Library /wp-admin/upload.php1,416 ▲134.24 ▲0.09100.66 ▼3.8243.34 ▼3.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • mb_mb_social_sharing_general_settings_name
    • db_upgraded
    • theysaidso_admin_options
    • mb_social_share_plugin_installed
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • 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 no errors were found, this is by no means 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
7 plugin tags: twitter share, googleplus share, facebook share, linkedin share, pinterest share...

mb-social-sharing/social_sharing.php 92% from 13 tests

The main file in "MB Social Sharing Plugin" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("mb-social-sharing.php" instead of "social_sharing.php")

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
There were no executable files found in this plugin704 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP14210157695
CSS1809

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.55
▷ Minimum class complexity2.00
▷ Maximum class complexity51.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods42
▷ Static methods12.38%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin