79% fx-calculators

Code Review | forex-calculators

WordPress plugin forex-calculators scored79%from 54 tests.

About plugin

  • Plugin page: fx-calculators
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 16, 2023
  • Latest release: Aug 28, 2023
  • Number of updates: 16
  • Update frequency: every 14.0 days
  • Top authors: tarborali (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /757 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.74ms] Passed 4 tests

Analyzing server-side resources used by forex-calculators
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.64 ▲4.91
Dashboard /wp-admin3.38 ▲0.0744.92 ▼0.43
Posts /wp-admin/edit.php3.49 ▲0.1347.82 ▲1.83
Add New Post /wp-admin/post-new.php5.98 ▲0.0981.59 ▼2.78
Media Library /wp-admin/upload.php3.30 ▲0.0734.83 ▼1.56

Server storage [IO: ▲0.18MB] [DB: ▲0.31MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for forex-calculators
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.40 ▼0.173.19 ▲1.5144.32 ▼0.07
Dashboard /wp-admin2,211 ▲405.56 ▼0.0190.14 ▲2.5237.82 ▼3.47
Posts /wp-admin/edit.php2,119 ▲192.00 ▲0.0340.22 ▼3.5334.00 ▼4.56
Add New Post /wp-admin/post-new.php1,540 ▲1223.33 ▲0.23686.61 ▼0.2062.21 ▲1.96
Media Library /wp-admin/upload.php1,416 ▲134.24 ▲0.00102.82 ▲2.5944.01 ▼1.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (1) for the number of arguments passed (2). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • fxcalc_activation_time

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

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Requires php: Invalid version format
Please take inspiration from this readme.txt

fx-calculators/forex-calculators.php 85% from 13 tests

Analyzing the main PHP file in "forex-calculators" version 1.2.1
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("fx-calculators.php" instead of "forex-calculators.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,182 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP56217481
Sass1593360
JavaScript3310321
JSON10019
CSS1001

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.50
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin