84% share-me

Code Review | ShareMe

WordPress plugin ShareMe scored84%from 54 tests.

About plugin

  • Plugin page: share-me
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 26, 2014
  • Latest release: Jun 7, 2017
  • Number of updates: 32
  • Update frequency: every 28.9 days
  • Top authors: tarek.chida (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,714 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.29MB] [CPU: ▼21.04ms] Passed 4 tests

An overview of server-side resources used by ShareMe
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0235.32 ▼8.24
Dashboard /wp-admin3.40 ▲0.0151.79 ▼15.42
Posts /wp-admin/edit.php3.51 ▲0.1251.11 ▼0.25
Add New Post /wp-admin/post-new.php4.69 ▼1.2443.63 ▼60.26
Media Library /wp-admin/upload.php3.32 ▲0.0542.37 ▲6.18

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 82 new files
Database: 2 new tables, 7 new options
New tables
wp_sm_social_list
wp_sm_config
New WordPress options
sm_auto_display
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for ShareMe
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7514.35 ▲0.001.70 ▼0.0439.87 ▼1.60
Dashboard /wp-admin2,200 ▲205.56 ▼0.1389.52 ▼2.8272.78 ▲31.04
Posts /wp-admin/edit.php2,117 ▲202.12 ▲0.1140.65 ▼2.9932.93 ▼5.73
Add New Post /wp-admin/post-new.php1,694 ▲16622.13 ▼0.97735.44 ▲17.6252.66 ▼2.15
Media Library /wp-admin/upload.php1,408 ▲144.15 ▼0.1394.89 ▼10.7576.60 ▲35.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • sm_auto_display
    • db_upgraded

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant SM_THEMES_PATH - assumed 'SM_THEMES_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/share-me/admin-share-me.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/share-me/admin-share-me.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/share-me/share-me.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: icons, social networks, posts, share

share-me/share-me.php Passed 13 tests

"ShareMe" version 1.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
68 characters long description:
Share WP posts on multiple Social Networks with different icons sets

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected397 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP36959319
Markdown111045
CSS21226
JavaScript1107

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods10100.00%
▷ Public methods10100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
74 PNG files occupy 0.30MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/elegent/tumblr.png3.27KB2.01KB▼ 38.34%
assets/css/images/logo_small.png0.61KB0.68KB0.00%
assets/images/elegent/googleplus.png4.68KB2.38KB▼ 49.12%
assets/images/cercle/mail.png1.25KB1.04KB▼ 17.38%
assets/images/leaf/linkedin.png0.70KB0.51KB▼ 27.25%