10% gerador-de-certificados-devapps

Code Review | Gerador de Certificados - DevApps

WordPress plugin Gerador de Certificados - DevApps scored10%from 54 tests.

About plugin

  • Plugin page: gerador-de-certif...
  • Plugin version: 1.3.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 14, 2023
  • Latest release: Nov 20, 2023
  • Number of updates: 19
  • Update frequency: every 14.8 days
  • Top authors: tidevapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /372 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.10ms] Passed 4 tests

This is a short check of server-side resources used by Gerador de Certificados - DevApps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1538.14 ▼5.46
Dashboard /wp-admin3.46 ▲0.1153.49 ▼12.64
Posts /wp-admin/edit.php3.57 ▲0.2151.42 ▲0.06
Add New Post /wp-admin/post-new.php6.04 ▲0.1594.75 ▼2.37
Media Library /wp-admin/upload.php3.38 ▲0.1535.97 ▲0.19
Gerar Certificados /wp-admin/admin.php?page=devapps-certificate-generator3.3633.80
Configurações /wp-admin/admin.php?page=devapps-certificate-generator-settings3.3734.23
Certificados Gerados /wp-admin/admin.php?page=devapps-certificate-generator-list3.3536.94

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 477 new files
Database: 2 new tables, 6 new options
New tables
wp_devapps_certificates
wp_devapps_certificate_models
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gerador de Certificados - DevApps
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18113.39 ▼0.887.76 ▲6.0835.58 ▼8.73
Dashboard /wp-admin2,222 ▲525.62 ▲0.0189.68 ▼18.8439.45 ▼4.16
Posts /wp-admin/edit.php2,127 ▲271.95 ▼0.0538.61 ▼0.6835.97 ▲0.70
Add New Post /wp-admin/post-new.php1,548 ▲2223.43 ▲0.23586.45 ▼22.3862.98 ▲9.77
Media Library /wp-admin/upload.php1,421 ▲244.18 ▼0.0396.00 ▲1.4841.97 ▼3.07
Gerar Certificados /wp-admin/admin.php?page=devapps-certificate-generator1,3601.8831.4799.20
Configurações /wp-admin/admin.php?page=devapps-certificate-generator-settings9541.8028.0836.02
Certificados Gerados /wp-admin/admin.php?page=devapps-certificate-generator-list8791.7727.2835.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_devapps_certificate_models
    • wp_devapps_certificates
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/gerador-de-certificados-devapps/admin/views/list.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/gerador-de-certificados-devapps/admin/views/tabs/models.php:30
    • > PHP Warning
      Use of undefined constant DEVAPPS_CERTIFICATE_GENERATOR_URL - assumed 'DEVAPPS_CERTIFICATE_GENERATOR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gerador-de-certificados-devapps/admin/views/settings.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/gerador-de-certificados-devapps/admin/views/tabs/course.php:37
    • > PHP Warning
      Use of undefined constant DEVAPPS_CERTIFICATE_GENERATOR_URL - assumed 'DEVAPPS_CERTIFICATE_GENERATOR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gerador-de-certificados-devapps/admin/views/tabs/models.php on line 24
    • > PHP Warning
      Use of undefined constant DEVAPPS_CERTIFICATE_GENERATOR_URL - assumed 'DEVAPPS_CERTIFICATE_GENERATOR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gerador-de-certificados-devapps/admin/views/list.php on line 4
    • > PHP Warning
      Use of undefined constant DEVAPPS_CERTIFICATE_GENERATOR_URL - assumed 'DEVAPPS_CERTIFICATE_GENERATOR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gerador-de-certificados-devapps/admin/views/tabs/person.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/gerador-de-certificados-devapps/admin/views/main.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/gerador-de-certificados-devapps/admin/views/tabs/generate.php:40
    • > PHP Warning
      Use of undefined constant DEVAPPS_CERTIFICATE_GENERATOR_URL - assumed 'DEVAPPS_CERTIFICATE_GENERATOR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gerador-de-certificados-devapps/admin/views/main.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/gerador-de-certificados-devapps/admin/views/tabs/person.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: palestrante, certifica, certificao, palestra, certificado para cursos...

gerador-de-certificados-devapps/devapps-certificate-generator.php 92% from 13 tests

Analyzing the main PHP file in "Gerador de Certificados - DevApps" version 1.3.5
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("gerador-de-certificados-devapps.php" instead of "devapps-certificate-generator.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
These items require your attention
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/gerador-de-certificados-devapps/vendors/qrcode/tools/merge.bat
8,283 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP381,8802,9117,621
JavaScript3618343
CSS3386241
PO File1152040
XML20027
JSON1003
Bourne Shell1002
DOS Batch1002
INI1002
Markdown1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity27.69
▷ Minimum class complexity1.00
▷ Maximum class complexity292.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes42
▷ Abstract classes00.00%
▷ Concrete classes42100.00%
▷ Final classes00.00%
Methods435
▷ Static methods14032.18%
▷ Public methods31371.95%
▷ Protected methods9622.07%
▷ Private methods265.98%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants104
▷ Global constants104100.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
42 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendors/qrcode/cache/frame_10.png0.20KB0.20KB▼ 0.99%
vendors/qrcode/cache/frame_35.png0.24KB0.21KB▼ 9.47%
vendors/qrcode/cache/frame_11.png0.20KB0.19KB▼ 6.83%
vendors/qrcode/cache/frame_21.png0.23KB0.22KB▼ 3.83%
vendors/qrcode/cache/frame_1.png0.12KB0.12KB▼ 1.59%