10% metro-share-widget

Code Review | Metro Share Widget

WordPress plugin Metro Share Widget scored 10% from 54 tests.

About plugin

  • Plugin page: metro-share-widget
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9
  • WordPress version: 5.9.2
  • First release: Dec 9, 2015
  • Latest release: Nov 9, 2017
  • Number of updates: 4
  • Update frequency: every 175.5 days
  • Top authors: WPManiax (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 2,881 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/metro-share-widget/plugin.php+286
    Function create_function() is deprecated

Server metrics [RAM: ▼2.48MB] [CPU: ▼340.55ms] Passed 4 tests

Server-side resources used by Metro Share Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.89 ▼1.624.71 ▼47.36
Dashboard /wp-admin1.91 ▼1.503.90 ▼29.34
Posts /wp-admin/edit.php1.91 ▼1.735.03 ▼30.10
Add New Post /wp-admin/post-new.php1.91 ▼5.094.14 ▼1,255.39
Media Library /wp-admin/upload.php1.91 ▼1.383.83 ▼19.72

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Metro Share Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,900 ▲17816.58 ▲0.5911.83 ▲6.182.43 ▼0.02
Dashboard /wp-admin2,892 ▲346.07 ▼0.11120.11 ▼16.46155.53 ▼4.06
Posts /wp-admin/edit.php2,695 ▲13.24 ▲0.0063.11 ▼3.39141.63 ▼4.29
Add New Post /wp-admin/post-new.php1,665 ▲416.47 ▲0.39426.57 ▼15.43160.14 ▼3.00
Media Library /wp-admin/upload.php1,694 ▼15.54 ▼0.00149.74 ▲13.90193.05 ▲6.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/metro-share-widget/plugin.php+286
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_metro-share-widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/metro-share-widget/views/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/metro-share-widget/views/widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: e-mail, sharing, link, bookmark, network...

metro-share-widget/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Metro Share Widget" version 1.0.1
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("metro-share-widget.php" instead of "plugin.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 plugin931 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PO File10017

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
No PNG files were detected