84% curvert-currency-calculator

Code Review | Currency Converter Widget

WordPress plugin Currency Converter Widget scored84%from 54 tests.

About plugin

  • Plugin page: curvert-currency-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Feb 6, 2018
  • Latest release: Aug 13, 2019
  • Number of updates: 14
  • Update frequency: every 39.5 days
  • Top authors: bigclick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /743 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.97ms] Passed 4 tests

An overview of server-side resources used by Currency Converter Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0436.35 ▼4.20
Dashboard /wp-admin3.35 ▲0.0443.53 ▼6.52
Posts /wp-admin/edit.php3.40 ▲0.0445.43 ▲0.18
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.37 ▼5.34
Media Library /wp-admin/upload.php3.27 ▲0.0437.70 ▲1.81

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Currency Converter Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.65 ▼0.761.59 ▼0.5542.35 ▼6.35
Dashboard /wp-admin2,206 ▲184.89 ▼0.02116.45 ▼3.7441.49 ▼3.67
Posts /wp-admin/edit.php2,089 ▲32.04 ▲0.0540.28 ▲2.6635.94 ▲1.61
Add New Post /wp-admin/post-new.php1,542 ▲918.59 ▼4.52612.69 ▼81.0558.69 ▲0.50
Media Library /wp-admin/upload.php1,391 ▲94.25 ▲0.0395.67 ▼5.6443.95 ▲1.03

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_curvert_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/curvert-currency-calculator/curvert.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can look at the official readme.txt

curvert-currency-calculator/curvert.php 92% from 13 tests

"Currency Converter Widget" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("curvert-currency-calculator.php" instead of "curvert.php")

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
There were no executable files found in this plugin529 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP23524346
CSS290130
JavaScript213049
SVG1004

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected