73% wp-monitor-dollar

Code Review | WP Cambio de Divisas

WordPress plugin WP Cambio de Divisas scored 73% from 54 tests.

About plugin

  • Plugin page: wp-monitor-dollar
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1.1-5.3.2
  • WordPress version: 5.8.1
  • First release: Mar 11, 2020
  • Latest release: Mar 11, 2020
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: carloscode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 720 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼138.74ms] Passed 4 tests

Server-side resources used by WP Cambio de Divisas
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2030.61 ▲4.79
Dashboard /wp-admin3.14 ▲0.0950.70 ▲1.58
Posts /wp-admin/edit.php3.25 ▲0.1547.78 ▲1.45
Add New Post /wp-admin/post-new.php5.51 ▲0.0898.63 ▼558.81
Media Library /wp-admin/upload.php3.08 ▲0.0835.94 ▲0.84

Server storage [IO: ▲0.19MB] [DB: ▲0.62MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 15 new files
Database: 3 new tables, 1 new option
New tables
wp_monitordollar_setting
wp_monitordollar_registry
wp_monitordollar
New WordPress options
tables_created

Browser metrics Passed 4 tests

WP Cambio de Divisas: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,707 ▲11115.89 ▲0.4710.11 ▲2.5450.54 ▼0.91
Dashboard /wp-admin2,993 ▲625.91 ▲0.00144.17 ▼14.53119.16 ▼2.06
Posts /wp-admin/edit.php2,765 ▲262.70 ▲0.0166.29 ▼7.5491.58 ▲2.70
Add New Post /wp-admin/post-new.php1,634 ▼4920.96 ▲2.43281.25 ▼137.21111.58 ▼6.66
Media Library /wp-admin/upload.php1,833 ▲235.03 ▲0.01169.75 ▲15.73125.78 ▼5.77

Uninstaller [IO: ▲0.02MB] [DB: ▲0.62MB] 50% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_monitordollar
    • wp_monitordollar_setting
    • wp_monitordollar_registry
  • Zombie WordPress options detected upon uninstall: 1 option
    • tables_created

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function returnRegistry() on null in wp-content/plugins/wp-monitor-dollar/admin/regit.php:2
    • > PHP Notice
      Undefined variable: consultas in wp-content/plugins/wp-monitor-dollar/admin/regit.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WpMonitorDollarConsultasModels' not found in wp-content/plugins/wp-monitor-dollar/class.dasboard.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-monitor-dollar/monitordollar.php:23
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-monitor-dollar/class.registry.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-monitor-dollar/class.setting.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-monitor-dollar/class.change.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
You can look at the official readme.txt

wp-monitor-dollar/monitordollar.php 85% from 13 tests

"WP Cambio de Divisas" version 0.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-monitor-dollar.php" instead of "monitordollar.php")

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
Success! There were no dangerous files found in this plugin871 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP711114549
CSS1159162
JavaScript1504160

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.24
Average class complexity16.50
▷ Minimum class complexity2.00
▷ Maximum class complexity31.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.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 Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/img/seocontenidoslogo.png28.47KB7.79KB▼ 72.65%
include/img/s.png107.01KB41.66KB▼ 61.07%