10% wc-apg-nifcifnie-field

Code Review | WC - APG NIF/CIF/NIE Field

WordPress plugin WC - APG NIF/CIF/NIE Field scored10%from 54 tests.

About plugin

  • Plugin page: wc-apg-nifcifnie-...
  • Plugin version: 2.1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Aug 12, 2016
  • Latest release: Jun 27, 2023
  • Number of updates: 62
  • Update frequency: every 40.5 days
  • Top authors: artprojectgroup (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

10,000+ active /129,766 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.25ms] Passed 4 tests

A check of server-side resources used by WC - APG NIF/CIF/NIE Field
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.46 ▲0.86
Dashboard /wp-admin3.31 ▼0.0453.95 ▼8.38
Posts /wp-admin/edit.php3.36 ▲0.0048.85 ▼6.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.83 ▼18.88
Media Library /wp-admin/upload.php3.23 ▲0.0036.14 ▲2.74

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 47 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WC - APG NIF/CIF/NIE Field
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6813.30 ▼1.131.77 ▼0.0443.32 ▼2.18
Dashboard /wp-admin2,206 ▲185.84 ▼0.0699.21 ▼3.9635.75 ▼8.96
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0234.97 ▼7.1331.04 ▼4.78
Add New Post /wp-admin/post-new.php1,538 ▲2423.45 ▲0.05686.23 ▲23.0753.59 ▲3.93
Media Library /wp-admin/upload.php1,391 ▼04.14 ▼0.07109.69 ▲13.1446.76 ▲2.33

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
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/wc-apg-nifcifnie-field/includes/formulario.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wc-apg-nifcifnie-field/includes/cuadro-informacion.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt might help

wc-apg-nifcifnie-field/apg-nif.php 92% from 13 tests

The main PHP file in "WC - APG NIF/CIF/NIE Field" ver. 2.1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-apg-nifcifnie-field.php" instead of "apg-nif.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,485 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP131761971,286
CSS2922665
SVG200270
Markdown1820203
JavaScript23761

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity28.29
▷ Minimum class complexity2.00
▷ Maximum class complexity165.00
Average method complexity5.78
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods40
▷ Static methods12.50%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin