78% metro-share

Code Review | Metro Share

WordPress plugin Metro Share scored 78% from 54 tests.

About plugin

  • Plugin page: metro-share
  • Plugin version: 0.5.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7
  • WordPress version: 6.3.1
  • First release: Apr 3, 2013
  • Latest release: Dec 12, 2016
  • Number of updates: 16
  • Update frequency: every 84.3 days
  • Top authors: ryanhellyer (62.5%)PerS (43.75%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 3,298 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
Install script ran successfully

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

This is a short check of server-side resources used by Metro Share
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.40 ▼2.20
Dashboard /wp-admin3.39 ▲0.0846.05 ▼3.46
Posts /wp-admin/edit.php3.50 ▲0.1445.57 ▲0.04
Add New Post /wp-admin/post-new.php5.98 ▲0.1082.53 ▼9.69
Media Library /wp-admin/upload.php3.31 ▲0.0833.77 ▲0.51
Sharing Icons /wp-admin/options-general.php?page=metro-share/metro-share.php3.2529.68

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
metroshare_settings
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Metro Share
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲17513.57 ▼0.578.45 ▲6.7138.97 ▼2.03
Dashboard /wp-admin2,202 ▲144.91 ▼1.00106.57 ▼9.0837.13 ▼5.30
Posts /wp-admin/edit.php2,098 ▲92.22 ▲0.2034.79 ▼0.5930.66 ▼4.42
Add New Post /wp-admin/post-new.php1,533 ▼023.08 ▼0.32592.51 ▼75.6932.83 ▼32.06
Media Library /wp-admin/upload.php1,390 ▲24.23 ▲0.0696.64 ▼3.8041.58 ▼5.76
Sharing Icons /wp-admin/options-general.php?page=metro-share/metro-share.php1,0292.0531.0141.75

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • metroshare_settings
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=metro-share/metro-share.php
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=metro-share/metro-share.php
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/metro-share/metro-share.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2 in metro-share/assets to your readme.txt
You can take inspiration from this readme.txt

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

The entry point to "Metro Share" version 0.5.10 is a PHP file that has certain tags in its header comment area
48 characters long description:
Super fast and super customizable social sharing

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin479 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP161116386
CSS21082
JavaScript21111

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.40MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/share-icons.png4.17KB2.46KB▼ 40.98%
screenshot-1.png133.48KB56.66KB▼ 57.55%
screenshot-2.png181.15KB178.50KB▼ 1.46%
assets/metronet-icon.png1.41KB0.58KB▼ 59.00%
assets/icons.png6.07KB3.05KB▼ 49.73%