62% social-media-panel-for-images

Code Review | SocialMediaPanelForImages

WordPress plugin SocialMediaPanelForImages scored62%from 54 tests.

About plugin

  • Plugin page: social-media-pane...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 25, 2014
  • Latest release: Apr 22, 2016
  • Number of updates: 4
  • Update frequency: every 207.0 days
  • Top authors: GRTteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,296 total downloads

Benchmarks

Plugin footprint 65% 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.91MB] [CPU: ▼35.79ms] Passed 4 tests

Server-side resources used by SocialMediaPanelForImages
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.82 ▼2.97
Dashboard /wp-admin3.03 ▼0.2728.15 ▼19.82
Posts /wp-admin/edit.php3.03 ▼0.3226.85 ▼28.46
Add New Post /wp-admin/post-new.php3.03 ▼2.8623.38 ▼84.39
Media Library /wp-admin/upload.php3.03 ▼0.2028.16 ▼10.48
Social Media Panel for Images /wp-admin/plugins.php?page=social-media-panel-for-images/smpi_plugin_admin_menu.php3.0331.78

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for SocialMediaPanelForImages
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲20913.73 ▼0.6215.15 ▲13.1540.92 ▲1.28
Dashboard /wp-admin2,196 ▲165.49 ▼0.0885.17 ▼6.8038.60 ▼8.04
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0134.59 ▼5.8233.98 ▲1.08
Add New Post /wp-admin/post-new.php1,530 ▲123.34 ▼0.08681.49 ▲32.8752.74 ▼7.74
Media Library /wp-admin/upload.php1,407 ▲104.30 ▲0.1497.31 ▼14.4045.61 ▼3.32
Social Media Panel for Images /wp-admin/plugins.php?page=social-media-panel-for-images/smpi_plugin_admin_menu.php8482.0426.9923.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=social-media-panel-for-images/smpi_plugin_admin_menu.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/plugins.php?page=social-media-panel-for-images/smpi_plugin_admin_menu.php
    • > Notice in wp-content/plugins/social-media-panel-for-images/smpi_plugin_admin_menu.php+30
    Undefined index: updated

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/social-media-panel-for-images/smpi_plugin_admin_menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/social-media-panel-for-images/uninstall.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/social-media-panel-for-images/smpi_plugin_admin_menu.php:3
    • > PHP Warning
      Use of undefined constant WP_UNINSTALL_PLUGIN - assumed 'WP_UNINSTALL_PLUGIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-media-panel-for-images/uninstall.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/plugins.php?page=social-media-panel-for-images/smpi_plugin_admin_menu.php
    • > Network (severe)
    wp-content/plugins/social-media-panel-for-images/images/LinkedIn.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Here you can see buttons on image. They appear only when cursor is over the image and hides when cursor is out.), #2 (Other image with buttons.), #3 (Admin panel for plugin. Here you can activate or deactivate buttons)
  • Tags: You are using too many tags: 17 tag instead of maximum 10
You can look at the official readme.txt

social-media-panel-for-images/index.php 92% from 13 tests

This is the main PHP file of "SocialMediaPanelForImages" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("social-media-panel-for-images.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected366 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS2192181
PHP41121168
JavaScript31117

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
15 PNG files occupy 0.35MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) images/pinterest.png6.89KB0.00KB▼ 100.00%
assets/screenshot-1.png28.55KB27.35KB▼ 4.20%
assets/screenshot-2.png108.09KB41.48KB▼ 61.62%
(invalid) images/flickr.png5.13KB0.00KB▼ 100.00%
images/LinkedIN.png39.14KB15.47KB▼ 60.47%