67% brazilian-fields-registry-wp

Code Review | Brazilian Fields in WordPress Registry

WordPress plugin Brazilian Fields in WordPress Registry scored67%from 54 tests.

About plugin

  • Plugin page: brazilian-fields-...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.1-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 29, 2022
  • Latest release: Aug 1, 2022
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: vinigoulart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /930 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼1.78ms] Passed 4 tests

An overview of server-side resources used by Brazilian Fields in WordPress Registry
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1940.29 ▲1.42
Dashboard /wp-admin3.48 ▲0.1450.85 ▼12.61
Posts /wp-admin/edit.php3.53 ▲0.1850.35 ▲3.62
Add New Post /wp-admin/post-new.php6.00 ▲0.1295.86 ▲0.45
Media Library /wp-admin/upload.php3.41 ▲0.1839.11 ▲4.57

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 256 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Brazilian Fields in WordPress Registry
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.20 ▼0.511.85 ▼0.0343.53 ▼1.38
Dashboard /wp-admin2,202 ▲225.62 ▼0.0388.46 ▼4.8838.74 ▼0.69
Posts /wp-admin/edit.php2,108 ▲51.98 ▲0.0239.85 ▲5.1235.05 ▼4.90
Add New Post /wp-admin/post-new.php1,535 ▲723.26 ▲0.13660.80 ▲29.5157.92 ▼1.15
Media Library /wp-admin/upload.php1,404 ▲14.20 ▲0.04113.41 ▲8.5348.88 ▲5.95

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

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

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)
Even though no errors were found, 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
Please take a closer look at the following
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/brazilian-fields-registry-wp/vendor/filp/whoops/src/Whoops/Resources/views/frames_description.html.php
    • > /wp-content/plugins/brazilian-fields-registry-wp/vendor/filp/whoops/src/Whoops/Resources/views/header.html.php
    • > /wp-content/plugins/brazilian-fields-registry-wp/vendor/filp/whoops/src/Whoops/Resources/views/env_details.html.php
    • > /wp-content/plugins/brazilian-fields-registry-wp/vendor/filp/whoops/src/Whoops/Resources/views/frame_code.html.php
  • 97× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: has_frames_tabs in wp-content/plugins/brazilian-fields-registry-wp/vendor/filp/whoops/src/Whoops/Resources/views/frames_description.html.php on line 2
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\ContextProviderInterface' not found in wp-content/plugins/brazilian-fields-registry-wp/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php:23
    • > PHP Notice
      Undefined variable: handlers in wp-content/plugins/brazilian-fields-registry-wp/vendor/filp/whoops/src/Whoops/Resources/views/env_details.html.php on line 35
    • > PHP Fatal error
      Trait 'WPBrazilianRegistry\\Common\\Hooker_Trait' not found in wp-content/plugins/brazilian-fields-registry-wp/classes/Plugin_Dependencies.php on line 8
    • > PHP Fatal error
      Trait 'WPBrazilianRegistry\\Common\\Hooker_Trait' not found in wp-content/plugins/brazilian-fields-registry-wp/classes/Validations.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Caster\\EnumStub' not found in wp-content/plugins/brazilian-fields-registry-wp/vendor/symfony/var-dumper/Caster/FrameStub.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' not found in wp-content/plugins/brazilian-fields-registry-wp/vendor/symfony/var-dumper/Cloner/AbstractCloner.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Caster\\ConstStub' not found in wp-content/plugins/brazilian-fields-registry-wp/vendor/symfony/var-dumper/Caster/ImgStub.php:17
    • > PHP Notice
      Undefined variable: frames in wp-content/plugins/brazilian-fields-registry-wp/vendor/filp/whoops/src/Whoops/Resources/views/frame_list.html.php on line 4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/brazilian-fields-registry-wp/vendor/filp/whoops/src/Whoops/Resources/views/env_details.html.php on line 35

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 86% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: telefone, brazil, registro, cpf, phone...

brazilian-fields-registry-wp/main.php 69% from 13 tests

The principal PHP file in "Brazilian Fields in WordPress Registry" v. 1.2.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Git Repository: There should be no Git repositories present in your plugin
  • Main file name: The principal plugin file should be the same as the plugin slug ("brazilian-fields-registry-wp.php" instead of "main.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 238 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
It is important to fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/brazilian-fields-registry-wp/vendor/bin/var-dump-server.bat
17,245 lines of code in 237 files:
LanguageFilesBlank linesComment linesLines of code
PHP2062,6114,01815,125
JSON900825
CSS311818792
Markdown101490272
JavaScript53532148
YAML319078
DOS Batch1005

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity14.78
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces27
Interfaces10
Traits4
Classes104
▷ Abstract classes76.73%
▷ Concrete classes9793.27%
▷ Final classes1515.46%
Methods685
▷ Static methods21931.97%
▷ Public methods58184.82%
▷ Protected methods537.74%
▷ Private methods517.45%
Functions256
▷ Named functions18973.83%
▷ Anonymous functions6726.17%
Constants100
▷ Global constants1313.00%
▷ Class constants8787.00%
▷ Public constants6777.01%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected