84% widget-indicadores-economicos-chile

Code Review | Widget Indicadores Económicos (Chile)

WordPress plugin Widget Indicadores Económicos (Chile) scored 84% from 54 tests.

About plugin

  • Plugin page: widget-indicadore...
  • Plugin version: 2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 6.3.1
  • First release: Aug 19, 2013
  • Latest release: Jun 1, 2016
  • Number of updates: 25
  • Update frequency: every 40.7 days
  • Top authors: Anixed (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active / 10,396 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.08ms] Passed 4 tests

An overview of server-side resources used by Widget Indicadores Económicos (Chile)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.71 ▲0.83
Dashboard /wp-admin3.32 ▲0.0147.73 ▼0.22
Posts /wp-admin/edit.php3.37 ▲0.0145.84 ▼0.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.62 ▼3.15
Media Library /wp-admin/upload.php3.24 ▲0.0133.49 ▼0.78

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: 1 new table, 8 new options
New tables
wp_indica_econo
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_indicadores-economicos-cl
table_db_version
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Widget Indicadores Económicos (Chile): an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.20 ▼1.071.95 ▲0.2644.13 ▼6.43
Dashboard /wp-admin2,206 ▲185.78 ▼0.1297.45 ▼8.8438.23 ▼6.00
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0534.00 ▼2.6534.17 ▲2.14
Add New Post /wp-admin/post-new.php1,544 ▲1118.54 ▼4.86610.95 ▼62.9761.01 ▲5.04
Media Library /wp-admin/upload.php1,388 ▼04.30 ▼0.0395.41 ▼12.8241.94 ▼2.31

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_indicadores-economicos-cl
    • widget_recent-comments
    • db_upgraded
    • table_db_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/widget-indicadores-economicos-chile/indicadores-economicos.php:38

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)
There were no browser issues found

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: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can look at the official readme.txt

widget-indicadores-economicos-chile/indicadores-economicos.php 92% from 13 tests

"Widget Indicadores Económicos (Chile)" version 2.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("widget-indicadores-economicos-chile.php" instead of "indicadores-economicos.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin313 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14020279
CSS13034

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin