84% consultar-cnpj

Code Review | Consultar CNPJ

WordPress plugin Consultar CNPJ scored84%from 54 tests.

About plugin

  • Plugin page: consultar-cnpj
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 11, 2018
  • Latest release: Jul 11, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: netominas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /703 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Consultar CNPJ
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.52 ▼6.85
Dashboard /wp-admin3.31 ▲0.0049.01 ▼4.32
Posts /wp-admin/edit.php3.36 ▲0.0045.87 ▼8.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.76 ▼8.27
Media Library /wp-admin/upload.php3.23 ▲0.0039.19 ▲3.40

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Consultar CNPJ
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲14413.93 ▼0.4510.60 ▲8.4242.52 ▼4.16
Dashboard /wp-admin2,209 ▲214.89 ▲0.0098.02 ▼19.8038.29 ▼3.12
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0135.50 ▼1.5732.12 ▼1.58
Add New Post /wp-admin/post-new.php1,529 ▲1023.33 ▼0.12701.40 ▲43.8454.02 ▼5.74
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0294.53 ▼9.4841.85 ▼1.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/consultar-cnpj/consultar-cnpj.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: cnpj, consultar cnpj

consultar-cnpj/consultar-cnpj.php Passed 13 tests

"Consultar CNPJ" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
44 characters long description:
Um simples consultor de CNPJ, porém eficaz.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,955 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
JavaScript31412239
PHP21843
CSS2082

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods3100.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
No PNG files were detected