84% metric-converter

Code Review | Metric Converter

WordPress plugin Metric Converter scored84%from 54 tests.

About plugin

  • Plugin page: metric-converter
  • Plugin version: 1.5.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Jan 5, 2019
  • Latest release: Mar 10, 2021
  • Number of updates: 18
  • Update frequency: every 45.7 days
  • Top authors: axeleus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active /40,378 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by Metric Converter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.23 ▲0.98
Dashboard /wp-admin3.32 ▲0.0153.52 ▲0.22
Posts /wp-admin/edit.php3.37 ▲0.0146.34 ▼3.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.21 ▲3.19
Media Library /wp-admin/upload.php3.24 ▲0.0138.20 ▲1.52

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Metric Converter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.34 ▼0.281.67 ▼0.0847.76 ▲8.75
Dashboard /wp-admin2,197 ▲295.65 ▲0.0787.98 ▼10.9644.49 ▲2.16
Posts /wp-admin/edit.php2,102 ▲21.95 ▼0.0935.08 ▼0.0733.63 ▲1.80
Add New Post /wp-admin/post-new.php1,528 ▼322.94 ▼0.18683.40 ▲23.7669.87 ▲20.00
Media Library /wp-admin/upload.php1,402 ▼14.21 ▲0.0494.42 ▼0.1339.20 ▼2.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/metric-converter/metric-converter.php:14

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
Please take inspiration from this readme.txt

metric-converter/metric-converter.php Passed 13 tests

This is the main PHP file of "Metric Converter" version 1.5.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
103 characters long description:
Extension for the visual editor. Conversion of metric units to American linear measures (inch, oz, lbs)

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
There were no executable files found in this plugin50 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP1131032
SVG40016
CSS1001
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin