79% gerar-certificado

Code Review | Gerar Certificado

WordPress plugin Gerar Certificado scored79%from 54 tests.

About plugin

  • Plugin page: gerar-certificado
  • Plugin version: 4.4
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Feb 19, 2021
  • Latest release: Jul 24, 2023
  • Number of updates: 23
  • Update frequency: every 38.5 days
  • Top authors: gerarcertificado (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,548 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.01MB] [CPU: ▼7.52ms] Passed 4 tests

A check of server-side resources used by Gerar Certificado
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.89 ▼5.37
Dashboard /wp-admin3.31 ▼0.0443.02 ▼18.79
Posts /wp-admin/edit.php3.36 ▲0.0046.84 ▲3.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.84 ▼9.34
Media Library /wp-admin/upload.php3.24 ▲0.0036.25 ▲5.08

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Gerar Certificado
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.51 ▼0.441.72 ▼0.0738.69 ▼3.47
Dashboard /wp-admin2,222 ▲314.84 ▼0.10107.61 ▼0.2641.29 ▼0.83
Posts /wp-admin/edit.php2,084 ▼52.02 ▲0.0138.47 ▲2.1935.24 ▲0.70
Add New Post /wp-admin/post-new.php1,532 ▲1123.31 ▲0.06600.72 ▼67.5658.81 ▲3.38
Media Library /wp-admin/upload.php1,407 ▲194.23 ▼0.0796.83 ▼17.3743.21 ▼9.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gerar-certificado/includes/pgc-create.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gerar-certificado/includes/pgc-functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/gerar-certificado/includes/pgc-create.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gerar-certificado/gerar-certificado.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: certifica, palestrante, certificado para eventos, certificado para cursos, palestra...

gerar-certificado/gerar-certificado.php Passed 13 tests

Analyzing the main PHP file in "Gerar Certificado" version 4.4
136 characters long description:
Gerar certificados para cursos e eventos não precisa ser complicado. Acesse https://gerarcertificado.com.br/ e crie sua conta gratuita.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,739 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript270171,057
CSS21885724
PHP397664
PO File1100101294

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
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
6 PNG files occupy 0.46MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/img-simulado-validade-paisagem.png39.51KB18.30KB▼ 53.67%
includes/images/img-chamada-modelos.png225.10KB22.58KB▼ 89.97%
includes/images/img-simulado-validade-paisagem-verso.png81.18KB10.76KB▼ 86.74%
includes/images/img-simulado-validade-retrato.png41.80KB18.66KB▼ 55.37%
includes/images/img-simulado-validade-retrato-verso.png80.25KB10.39KB▼ 87.05%