78% kg-to-lbs-converter

Code Review | KG to LBS Converter

WordPress plugin KG to LBS Converter scored 78% from 54 tests.

About plugin

  • Plugin page: kg-to-lbs-converter
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Jun 14, 2022
  • Latest release: Jun 14, 2022
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: vikas4travel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 430 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
Installer ran successfully

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

A check of server-side resources used by KG to LBS Converter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.14 ▲0.51
Dashboard /wp-admin3.32 ▲0.0246.05 ▼1.99
Posts /wp-admin/edit.php3.37 ▲0.0152.25 ▲3.77
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.78 ▼20.42
Media Library /wp-admin/upload.php3.24 ▲0.0134.70 ▲2.12
KG to LBS Converter /wp-admin/options-general.php?page=kg-to-lbs-converter3.2736.83

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
klc_welcome
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by KG to LBS Converter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.581.78 ▼0.3745.22 ▲5.72
Dashboard /wp-admin2,210 ▲334.84 ▼1.10115.29 ▲0.8044.09 ▼0.37
Posts /wp-admin/edit.php2,096 ▲72.02 ▼0.0140.65 ▼2.5736.74 ▲1.29
Add New Post /wp-admin/post-new.php1,517 ▼1617.62 ▼5.51613.35 ▼6.2453.44 ▼9.39
Media Library /wp-admin/upload.php1,389 ▲44.24 ▲0.03101.00 ▼2.9543.46 ▼3.11
KG to LBS Converter /wp-admin/options-general.php?page=kg-to-lbs-converter1,4402.6171.8439.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • klc_welcome
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/kg-to-lbs-converter/kg-to-lbs-converter.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kg-to-lbs-converter/templates/admin-panel.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kg-to-lbs-converter/templates/kg-to-lbs-converter-template.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: weight metric to imperial, kg to lbs converter, unit converter

kg-to-lbs-converter/kg-to-lbs-converter.php 92% from 13 tests

"KG to LBS Converter" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.9" instead of "5.2")

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
Success! There were no dangerous files found in this plugin597 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP410972320
CSS2266149
JavaScript238891
Markdown117037

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.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 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.59MB with 0.35MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png254.70KB68.56KB▼ 73.08%
assets/screenshot-2.png258.38KB69.91KB▼ 72.94%
assets/screenshot-4.png49.28KB27.21KB▼ 44.79%
assets/screenshot-3.png46.70KB25.81KB▼ 44.74%