84% mm-social

Code Review | MM Social

WordPress plugin MM Social scored84%from 54 tests.

About plugin

  • Plugin page: mm-social
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Jun 22, 2020
  • Latest release: Jun 24, 2020
  • Number of updates: 4
  • Update frequency: every 1.8 days
  • Top authors: samarpitabhattacharya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /428 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.31ms] Passed 4 tests

A check of server-side resources used by MM Social
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0842.91 ▲0.13
Dashboard /wp-admin3.40 ▲0.1049.61 ▼6.51
Posts /wp-admin/edit.php3.45 ▲0.0951.72 ▲0.03
Add New Post /wp-admin/post-new.php6.00 ▲0.1191.27 ▼17.64
Media Library /wp-admin/upload.php3.33 ▲0.0939.63 ▼1.10
Settings /wp-admin/admin.php?page=socialicon3.2936.71
Help /wp-admin/admin.php?page=socialicon-help3.2934.20

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 67 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by MM Social
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.61 ▼0.741.70 ▲0.0142.33 ▼0.42
Dashboard /wp-admin2,314 ▲1345.92 ▲0.25102.56 ▲9.9880.84 ▲32.95
Posts /wp-admin/edit.php2,179 ▲792.67 ▲0.6442.25 ▲3.9536.99 ▲0.22
Add New Post /wp-admin/post-new.php1,728 ▲20022.77 ▼0.35779.33 ▲110.8538.92 ▼12.54
Media Library /wp-admin/upload.php1,476 ▲764.68 ▲0.45106.33 ▼1.5177.06 ▲30.24
Settings /wp-admin/admin.php?page=socialicon4,1484.3091.8847.15
Help /wp-admin/admin.php?page=socialicon-help8862.3029.6425.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mm-social/mm-social.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mm-social/mm-social.php:19
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/mm-social/mm-social.php on line 15
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mm-social/mm-social.php on line 15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please a description for screenshot #3 in mm-social/assets to your readme.txt
You can look at the official readme.txt

mm-social/mm-social.php Passed 13 tests

The principal PHP file in "MM Social" v. 1.1 is loaded by WordPress automatically on each request
62 characters long description:
This is easy use plugin with this shortcode : [MM_SOCIAL_ICON]

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,985 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript92332901
CSS71545628
PHP511716456

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity16.67
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
24 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/custom_background.png1.87KB2.12KB0.00%
assets/images/colorpicker_hex.png0.52KB0.42KB▼ 19.92%
assets/images/colorpicker_background.png1.85KB2.14KB0.00%
assets/images/custom_hsb_h.png0.95KB0.73KB▼ 23.40%
assets/images/custom_hex.png0.55KB0.39KB▼ 28.11%