84% social-media-popup-free

Code Review | Social Media Popup

WordPress plugin Social Media Popup scored 84% from 54 tests.

About plugin

  • Plugin page: social-media-popu...
  • Plugin version: 0.7.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.5.1
  • WordPress version: 5.8.1
  • First release: Jul 24, 2016
  • Latest release: Jul 24, 2016
  • Number of updates: 8
  • Update frequency: every 3.0 days
  • Top authors: gruz0 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,825 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
Installer ran successfully

Server metrics [RAM: ▲0.55MB] [CPU: ▼129.14ms] Passed 4 tests

This is a short check of server-side resources used by Social Media Popup
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.11 ▲0.3934.48 ▲12.42
Dashboard /wp-admin3.71 ▲0.6668.03 ▲31.07
Posts /wp-admin/edit.php3.76 ▲0.6552.12 ▲7.33
Add New Post /wp-admin/post-new.php6.01 ▲0.57106.77 ▼542.49
Media Library /wp-admin/upload.php3.59 ▲0.5940.28 ▲6.17
VK /wp-admin/admin.php?page=social_media_popup_free_vkontakte_options3.6344.26
Facebook /wp-admin/admin.php?page=social_media_popup_free_facebook_options3.6341.17
SMP Free Options /wp-admin/admin.php?page=social_media_popup_free3.5737.80

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 42 new files
Database: no new tables, 54 new options
New WordPress options
scp-setting_container_width
scp-setting_vkontakte_delay_before_render
scp-setting_container_height
scp-setting_vkontakte_tab_caption
scp-setting_facebook_use_small_header
scp-setting_facebook_width
scp-setting_delay_before_show_bottom_button
scp-setting_button_to_close_widget_title
scp-version
scp-setting_background_image
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Media Popup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,962 ▲36616.66 ▲0.9424.13 ▲13.4562.00 ▲10.77
Dashboard /wp-admin3,060 ▲1266.58 ▲0.45149.32 ▼3.19120.74 ▲2.69
Posts /wp-admin/edit.php2,832 ▲932.46 ▼0.3877.43 ▲9.69115.64 ▲19.78
Add New Post /wp-admin/post-new.php1,693 ▲8922.14 ▲3.15292.58 ▼77.67115.41 ▲1.62
Media Library /wp-admin/upload.php1,901 ▲915.36 ▲0.35130.64 ▼29.69129.52 ▲10.48
VK /wp-admin/admin.php?page=social_media_popup_free_vkontakte_options2,6337.73212.57135.89
Facebook /wp-admin/admin.php?page=social_media_popup_free_facebook_options2,0727.05169.16135.41
SMP Free Options /wp-admin/admin.php?page=social_media_popup_free1,2182.8667.7880.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 54 options in the database
    • scp-setting_vkontakte_height
    • scp-setting_vkontakte_page_url
    • scp-setting_vkontakte_color_button
    • scp-setting_facebook_show_facepile
    • scp-setting_icons_size_on_desktop
    • scp-setting_vkontakte_page_or_group_id
    • scp-setting_show_close_button_in
    • scp-setting_display_after_n_days
    • scp-who_should_see_the_popup
    • scp-setting_debug_mode
    • ...

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

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 fix the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'SCP_Provider' not found in wp-content/plugins/social-media-popup-free/lib/providers/vkontakte.php:3
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/social-media-popup-free/tests/bootstrap.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-media-popup-free/templates/copyright.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/social-media-popup-free/tests/test-plugin.php:3
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/social-media-popup-free/tests/bootstrap.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'SCP_Provider' not found in wp-content/plugins/social-media-popup-free/lib/providers/facebook.php:3
    • > PHP Warning
      Use of undefined constant SMP_PREFIX - assumed 'SMP_PREFIX' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-media-popup-free/templates/copyright.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

social-media-popup-free/social-media-popup-free.php 92% from 13 tests

The main PHP script in "Social Media Popup" version 0.7.5 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected3,885 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP136035782,454
SVG100685
PO File1196304267
CSS405204
JavaScript33916152
Markdown2390109
XML10014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity22.50
▷ Minimum class complexity3.00
▷ Maximum class complexity105.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods122
▷ Static methods4536.89%
▷ Public methods9275.41%
▷ Protected methods00.00%
▷ Private methods3024.59%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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