94% entenda-antes-o-mundo-da-construcao

Code Review | Entenda Antes - O Mundo da Construção

WordPress plugin Entenda Antes - O Mundo da Construção scored 94% from 54 tests.

About plugin

  • Plugin page: entenda-antes-o-m...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 5.8.1
  • First release: Jan 16, 2020
  • Latest release: Feb 17, 2020
  • Number of updates: 16
  • Update frequency: every 2.0 days
  • Top authors: jgalmeida93 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 284 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.56MB] [CPU: ▼155.49ms] Passed 4 tests

An overview of server-side resources used by Entenda Antes - O Mundo da Construção
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2138.09 ▲15.66
Dashboard /wp-admin3.15 ▲0.0944.88 ▼3.82
Posts /wp-admin/edit.php3.20 ▲0.0853.16 ▼0.37
Add New Post /wp-admin/post-new.php2.93 ▼2.5130.00 ▼615.89
Media Library /wp-admin/upload.php3.09 ▲0.0932.92 ▼1.86

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Entenda Antes - O Mundo da Construção
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲6615.86 ▼0.089.69 ▼0.5946.50 ▼12.37
Dashboard /wp-admin2,989 ▲585.97 ▼0.03137.69 ▼5.09116.93 ▼4.10
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0170.31 ▲4.0996.86 ▼0.91
Add New Post /wp-admin/post-new.php1,672 ▲17218.93 ▲0.15384.55 ▲3.66115.84 ▼5.58
Media Library /wp-admin/upload.php1,807 ▼05.01 ▲0.00148.34 ▼9.45116.82 ▼9.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: api_url in wp-content/plugins/entenda-antes-o-mundo-da-construcao/test-environment.php on line 18
    • > PHP Notice
      Undefined variable: css_h3 in wp-content/plugins/entenda-antes-o-mundo-da-construcao/dynamic-form.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/entenda-antes-o-mundo-da-construcao/test-environment.php:25
    • > PHP Notice
      Undefined variable: unique_id in wp-content/plugins/entenda-antes-o-mundo-da-construcao/dynamic-form.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/entenda-antes-o-mundo-da-construcao/static-form.php:46
    • > PHP Notice
      Undefined variable: css_full_col in wp-content/plugins/entenda-antes-o-mundo-da-construcao/static-form.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/entenda-antes-o-mundo-da-construcao/dynamic-form.php:25
    • > PHP Notice
      Undefined variable: api_url in wp-content/plugins/entenda-antes-o-mundo-da-construcao/dynamic-form.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/entenda-antes-o-mundo-da-construcao/ea-integra.php:10
    • > PHP Notice
      Undefined variable: unique_id in wp-content/plugins/entenda-antes-o-mundo-da-construcao/test-environment.php on line 19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
1 plugin tags: entenda antes

entenda-antes-o-mundo-da-construcao/ea-integra.php 92% from 13 tests

The main PHP script in "Entenda Antes - O Mundo da Construção" version 1.0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("entenda-antes-o-mundo-da-construcao.php" instead of "ea-integra.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin19,950 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS41,41615110,190
JavaScript61,6951,5828,235
PHP5101271,483
Markdown225042

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
2 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/five_stars.png35.02KB11.32KB▼ 67.69%
img/shield.png18.11KB4.82KB▼ 73.37%