83% romanian-billing-fields

Code Review | Romanian billing fields

WordPress plugin Romanian billing fields scored83%from 54 tests.

About plugin

  • Plugin page: romanian-billing-...
  • Plugin version: 1.6.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 4, 2018
  • Latest release: Apr 6, 2023
  • Number of updates: 52
  • Update frequency: every 32.2 days
  • Top authors: robertutzu (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,529 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.60ms] Passed 4 tests

This is a short check of server-side resources used by Romanian billing fields
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.73 ▲2.91
Dashboard /wp-admin3.33 ▲0.0350.20 ▼3.63
Posts /wp-admin/edit.php3.38 ▲0.0248.13 ▼0.43
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.63 ▼13.24
Media Library /wp-admin/upload.php3.25 ▲0.0236.66 ▲2.94

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Romanian billing fields
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.111.60 ▲0.0739.50 ▼1.82
Dashboard /wp-admin2,195 ▲185.67 ▲0.1591.20 ▲3.4540.30 ▼1.68
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0336.06 ▼1.2533.16 ▼2.10
Add New Post /wp-admin/post-new.php1,526 ▼523.18 ▼0.05672.09 ▼10.1354.53 ▼1.60
Media Library /wp-admin/upload.php1,403 ▲34.25 ▼0.15100.28 ▼6.0243.69 ▼13.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/romanian-billing-fields/grc-romanian-billing-fields.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === romanian-billing-fields === )
  • Screenshots: These screenshots lack descriptions #1, #2 in romanian-billing-fields/assets to your readme.txt
You can take inspiration from this readme.txt

romanian-billing-fields/grc-romanian-billing-fields.php 85% from 13 tests

Analyzing the main PHP file in "Romanian billing fields" version 1.6.1
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.3.0" instead of "5.3.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("romanian-billing-fields.php" instead of "grc-romanian-billing-fields.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 plugin162 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15040162

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin