10% cotacao-dolar-hoje

Code Review | Cotação Dólar

WordPress plugin Cotação Dólar scored10%from 54 tests.

About plugin

  • Plugin page: cotacao-dolar-hoje
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jun 2, 2015
  • Latest release: Jul 21, 2015
  • Number of updates: 7
  • Update frequency: every 7.0 days
  • Top authors: febeckers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /3,913 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/cotacao-dolar-hoje/index.php+117
    syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF)

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.03ms] Passed 4 tests

Analyzing server-side resources used by Cotação Dólar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.05 ▼1.25
Dashboard /wp-admin3.31 ▲0.0046.06 ▼4.13
Posts /wp-admin/edit.php3.36 ▲0.0044.50 ▼3.18
Add New Post /wp-admin/post-new.php5.89 ▲0.00102.34 ▲1.86
Media Library /wp-admin/upload.php3.23 ▲0.0033.88 ▲0.45

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cotação Dólar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.23 ▼1.001.86 ▼0.1346.22 ▼7.10
Dashboard /wp-admin2,203 ▲155.83 ▲0.9798.07 ▼17.8038.88 ▼9.11
Posts /wp-admin/edit.php2,068 ▼212.00 ▼0.0138.89 ▲1.8034.87 ▼0.24
Add New Post /wp-admin/post-new.php1,538 ▲218.27 ▼5.02595.43 ▼56.9454.21 ▲4.92
Media Library /wp-admin/upload.php1,391 ▲64.24 ▲0.06100.21 ▼1.7046.27 ▲4.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in wp-content/plugins/cotacao-dolar-hoje/index.php on line 117

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% 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 need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === cotacao-dolar-hoje === )
The official readme.txt is a good inspiration

cotacao-dolar-hoje/index.php 92% from 13 tests

"Cotação Dólar" version 2.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:
  • Main file name: Name the main plugin file the same as the plugin slug ("cotacao-dolar-hoje.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected57 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1382752
CSS1045

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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
No PNG images were found in this plugin