82% cotacao-moedas-hoje

Code Review | Cotação Moedas

WordPress plugin Cotação Moedas scored 82% from 53 tests.

About plugin

  • Plugin page: cotacao-moedas-hoje
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 5.8.1
  • First release: Dec 18, 2018
  • Latest release: Oct 10, 2019
  • Number of updates: 10
  • Update frequency: every 29.6 days
  • Top authors: migueldaipre (100%)

Code review

53 tests

User reviews

1 review

Install metrics

200+ active / 3,188 total downloads


Plugin footprint Passed 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Cotação Moedas
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1223.26 ▲2.58
Dashboard /wp-admin3.16 ▲0.1145.18 ▲3.55
Posts /wp-admin/edit.php3.27 ▲0.1645.03 ▲0.06
Add New Post /wp-admin/post-new.php5.52 ▲0.0993.72 ▼1,054.54
Media Library /wp-admin/upload.php3.10 ▲0.1032.58 ▼6.93
Cotação Moedas /wp-admin/options-general.php?page=cmh-bcb3.1028.01

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Cotação Moedas: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,675 ▲9316.13 ▲0.337.15 ▼0.9247.80 ▼5.34
Dashboard /wp-admin2,957 ▲1076.55 ▲0.64136.64 ▲2.9899.56 ▼6.66
Posts /wp-admin/edit.php2,733 ▲272.74 ▲0.0564.67 ▼3.69101.92 ▲4.05
Add New Post /wp-admin/post-new.php1,886 ▲3317.43 ▼1.33367.92 ▲11.93124.37 ▲9.63
Media Library /wp-admin/upload.php1,800 ▲875.33 ▲0.34120.85 ▼30.15108.65 ▼14.00
Cotação Moedas /wp-admin/options-general.php?page=cmh-bcb1,0812.5554.2767.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=cmh-bcb
    • > Notice in wp-content/plugins/cotacao-moedas-hoje/admin/partials/cmh-bcb-admin-display.php+37
    Undefined variable: soapActive

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cotacao-moedas-hoje/public/partials/cmh-bcb-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/cotacao-moedas-hoje/admin/partials/cmh-bcb-admin-display.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

cotacao-moedas-hoje/cmh-bcb.php 85% from 13 tests

The main file in "Cotação Moedas" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("cotacao-moedas-hoje.php" instead of "cmh-bcb.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin630 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.43
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods25.26%
▷ Public methods3181.58%
▷ Protected methods00.00%
▷ Private methods718.42%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/imgs/logo_admin.png3.42KB1.30KB▼ 61.98%