10% metro-share-widget

Code Review | Metro Share Widget

WordPress plugin Metro Share Widget scored10%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: 6.3.1
  • 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

200+ active /3,158 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended 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: ▼1.90MB] [CPU: ▼51.79ms] Passed 4 tests

This is a short check of server-side resources used by Metro Share Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.384.08 ▼33.44
Dashboard /wp-admin2.11 ▼1.205.54 ▼43.63
Posts /wp-admin/edit.php2.11 ▼1.255.86 ▼39.73
Add New Post /wp-admin/post-new.php2.11 ▼3.785.76 ▼90.36
Media Library /wp-admin/upload.php2.11 ▼1.136.77 ▼25.05

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_metro-share-widget

Browser metrics Passed 4 tests

Metro Share Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲17914.00 ▼0.755.37 ▲3.5938.25 ▼6.69
Dashboard /wp-admin2,204 ▲155.86 ▲0.95104.47 ▼6.5938.64 ▼5.09
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0341.52 ▲4.1736.21 ▲2.82
Add New Post /wp-admin/post-new.php1,541 ▲823.42 ▼0.02618.01 ▼48.2259.53 ▼0.49
Media Library /wp-admin/upload.php1,395 ▲74.22 ▼0.0697.42 ▲3.1243.02 ▲0.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • 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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_metro-share-widget
    • can_compress_scripts
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/metro-share-widget/views/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/metro-share-widget/views/admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

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: link, e-mail, email, share, bookmark...

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

The principal PHP file in "Metro Share Widget" v. 1.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as 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
No dangerous file extensions were detected931 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
SVG100640
PHP370112167
CSS216480
JavaScript33227
PO File10017

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
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
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin