84% metal-social-share

Code Review | Metal Social Share

WordPress plugin Metal Social Share scored84%from 54 tests.

About plugin

  • Plugin page: metal-social-share
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.7
  • WordPress version: 6.3.1
  • First release: Dec 21, 2016
  • Latest release: Jan 2, 2017
  • Number of updates: 11
  • Update frequency: every 1.6 days
  • Top authors: sarequl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /569 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.87ms] Passed 4 tests

This is a short check of server-side resources used by Metal Social Share
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.05 ▼3.33
Dashboard /wp-admin3.32 ▲0.0150.52 ▼2.51
Posts /wp-admin/edit.php3.37 ▲0.0141.67 ▼10.64
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.23 ▼6.98
Media Library /wp-admin/upload.php3.24 ▲0.0139.24 ▲0.35

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Metal Social Share
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.72 ▲0.371.89 ▼0.0542.02 ▼6.50
Dashboard /wp-admin2,195 ▲185.61 ▲0.0289.93 ▼7.3339.33 ▼1.95
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0534.46 ▼5.9832.84 ▼2.16
Add New Post /wp-admin/post-new.php1,661 ▲13322.50 ▼0.63600.55 ▼82.9259.87 ▲6.68
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.01111.28 ▲4.9048.29 ▲3.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/metal-social-share/metal_share.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif).) image not found
You can take inspiration from this readme.txt

metal-social-share/metal_share.php 92% from 13 tests

Analyzing the main PHP file in "Metal Social Share" version 2.2.0
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("metal-social-share.php" instead of "metal_share.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin69 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS12043
PHP122826

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/stumbleupon.png5.87KB3.60KB▼ 38.56%
images/pintrest.png6.31KB3.80KB▼ 39.72%
images/youtube.png6.02KB3.64KB▼ 39.53%
images/tumblr.png5.60KB3.68KB▼ 34.20%
images/twitter.png5.46KB3.47KB▼ 36.41%