94% apuracao-eleicoes-brasil

Code Review | Apuracao Eleicoes Brasil

WordPress plugin Apuracao Eleicoes Brasil scored 94% from 54 tests.

About plugin

  • Plugin page: apuracao-eleicoes...
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 5.8.1
  • First release: Oct 5, 2014
  • Latest release: Oct 5, 2018
  • Number of updates: 18
  • Update frequency: every 81.2 days
  • Top authors: valeriosza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 943 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Apuracao Eleicoes Brasil
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1241.60 ▲15.17
Dashboard /wp-admin3.06 ▲0.0140.93 ▼6.39
Posts /wp-admin/edit.php3.11 ▲0.0042.75 ▲4.67
Add New Post /wp-admin/post-new.php5.42 ▼0.0191.00 ▼548.42
Media Library /wp-admin/upload.php3.00 ▼0.0133.06 ▼8.55

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Apuracao Eleicoes Brasil
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.28 ▲0.359.46 ▲0.8450.83 ▲3.70
Dashboard /wp-admin2,973 ▲425.91 ▼0.03135.68 ▼3.70110.85 ▼6.41
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0067.59 ▼1.5190.79 ▲3.24
Add New Post /wp-admin/post-new.php1,510 ▲1018.60 ▲0.05378.71 ▲16.60115.53 ▲4.30
Media Library /wp-admin/upload.php1,807 ▼35.01 ▼0.04150.53 ▲2.70118.19 ▲3.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

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)
Everything seems fine, however 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 fix 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 add_shortcode() in wp-content/plugins/apuracao-eleicoes-brasil/apuracao-eleicoes-brasil.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: tse, brazil, apuracao, eleicoes, brasil

apuracao-eleicoes-brasil/apuracao-eleicoes-brasil.php 85% from 13 tests

The main PHP script in "Apuracao Eleicoes Brasil" version 0.3.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected14 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP221114

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin