84% venezuelan-economic-indicators

Code Review | Venezuelan Economic Indicators Widget

WordPress plugin Venezuelan Economic Indicators Widget scored84%from 54 tests.

About plugin

  • Plugin page: venezuelan-econom...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0
  • WordPress version: 6.3.1
  • First release: Oct 14, 2017
  • Latest release: Oct 19, 2018
  • Number of updates: 32
  • Update frequency: every 11.7 days
  • Top authors: jordicuevas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /713 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.56ms] Passed 4 tests

Analyzing server-side resources used by Venezuelan Economic Indicators Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.04 ▼3.22
Dashboard /wp-admin3.34 ▲0.0349.27 ▲1.59
Posts /wp-admin/edit.php3.39 ▲0.0350.53 ▼0.32
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.10 ▼12.29
Media Library /wp-admin/upload.php3.26 ▲0.0337.06 ▲5.79

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_jjva_economic-indicators-widget
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Venezuelan Economic Indicators Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.121.68 ▼0.2539.28 ▼3.66
Dashboard /wp-admin2,206 ▲154.85 ▼0.06104.81 ▲3.2239.03 ▼1.33
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0235.72 ▼5.0432.33 ▼3.99
Add New Post /wp-admin/post-new.php1,514 ▲117.69 ▼0.02626.87 ▲27.2858.26 ▼3.45
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0895.61 ▼5.6841.10 ▲0.00

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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_jjva_economic-indicators-widget
    • widget_recent-comments
    • widget_recent-posts

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/venezuelan-economic-indicators/jjva_indicators_widget.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

venezuelan-economic-indicators/jjva_indicators_widget.php 92% from 13 tests

The primary PHP file in "Venezuelan Economic Indicators Widget" version 0.1.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("venezuelan-economic-indicators.php" instead of "jjva_indicators_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected81 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1122468
CSS11013

PHP code Passed 2 tests

Analyzing 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.06
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.11MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/simadi.png20.60KB15.19KB▼ 26.27%
icons/trm.png11.67KB7.84KB▼ 32.83%
icons/dolar1.png20.58KB14.01KB▼ 31.94%
icons/venta.png15.28KB10.94KB▼ 28.45%
icons/euro.png5.57KB5.80KB0.00%