84% another-unit-converter

Code Review | Another Unit Converter

WordPress plugin Another Unit Converter scored 84% from 54 tests.

About plugin

  • Plugin page: another-unit-conv...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Apr 26, 2017
  • Latest release: Jul 7, 2019
  • Number of updates: 5
  • Update frequency: every 160.4 days
  • Top authors: smilingrobots (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,382 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼2.47ms] Passed 4 tests

Analyzing server-side resources used by Another Unit Converter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3644.91 ▲3.77
Dashboard /wp-admin3.67 ▲0.3746.47 ▼5.67
Posts /wp-admin/edit.php3.78 ▲0.4351.28 ▼0.61
Add New Post /wp-admin/post-new.php6.25 ▲0.3687.66 ▼7.37
Media Library /wp-admin/upload.php3.59 ▲0.3639.23 ▲7.62
Another Unit Converter /wp-admin/options-general.php?page=aucp_settings3.5631.95

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 37 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
aucp_settings
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Another Unit Converter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.67 ▼0.924.42 ▲2.4844.15 ▼8.38
Dashboard /wp-admin2,210 ▲225.81 ▼0.0496.89 ▼7.4637.82 ▼5.70
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0534.90 ▼1.7331.47 ▼1.57
Add New Post /wp-admin/post-new.php1,536 ▲1623.40 ▲0.34674.39 ▼2.1051.52 ▲3.79
Media Library /wp-admin/upload.php1,395 ▲104.26 ▼0.0396.07 ▼4.5443.42 ▲1.40
Another Unit Converter /wp-admin/options-general.php?page=aucp_settings1,5492.0227.7129.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • aucp_settings
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/another-unit-converter/includes/class-settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/another-unit-converter/templates/currency-switcher-not-ready.tpl.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/another-unit-converter/templates/currency-switcher.tpl.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: conversion, currency, currency switcher, money, price converter...

another-unit-converter/another-unit-converter.php 92% from 13 tests

The entry point to "Another Unit Converter" version 1.1.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected3,069 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP10249652,567
LESS235113324
JavaScript24516177
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity19.14
▷ Minimum class complexity2.00
▷ Maximum class complexity36.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods60
▷ Static methods11.67%
▷ Public methods5286.67%
▷ Protected methods00.00%
▷ Private methods813.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin