84% miratio

Code Review | MIRATIO - Facturación electrónica Perú

WordPress plugin MIRATIO - Facturación electrónica Perú scored84%from 54 tests.

About plugin

  • Plugin page: miratio
  • Plugin version: 2.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Dec 8, 2020
  • Latest release: Oct 14, 2022
  • Number of updates: 89
  • Update frequency: every 7.6 days
  • Top authors: carlod (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,163 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
Installer ran successfully

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

Analyzing server-side resources used by MIRATIO - Facturación electrónica Perú
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.05 ▲0.64
Dashboard /wp-admin3.32 ▲0.0146.01 ▼4.48
Posts /wp-admin/edit.php3.37 ▲0.0146.73 ▲0.51
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.49 ▼11.96
Media Library /wp-admin/upload.php3.24 ▲0.0137.23 ▼2.06

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for MIRATIO - Facturación electrónica Perú
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲4513.99 ▼0.051.94 ▼0.2439.19 ▼3.93
Dashboard /wp-admin2,209 ▲325.54 ▼0.1387.84 ▼1.1037.67 ▼7.03
Posts /wp-admin/edit.php2,117 ▲172.02 ▼0.0035.21 ▼7.6533.67 ▼2.02
Add New Post /wp-admin/post-new.php1,540 ▲1423.02 ▼0.22636.71 ▲42.3659.70 ▼40.78
Media Library /wp-admin/upload.php1,417 ▲144.22 ▲0.0298.06 ▲2.8244.09 ▲3.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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 no errors were found, this is by no means 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
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/miratio/includes/miratio-lib.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/miratio/modules.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/miratio/includes/miratio-woocommerce-frontend.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/miratio/includes/miratio-admin-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/miratio/includes/miratio-woocommerce-admin-front.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add a description for screenshot #5 in miratio/assets to your readme.txt
Please take inspiration from this readme.txt

miratio/miratio.php 92% from 13 tests

The main PHP file in "MIRATIO - Facturación electrónica Perú" ver. 2.6 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected1,265 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP72492101,178
JavaScript1121178
CSS1109

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity13.50
▷ Minimum class complexity4.00
▷ Maximum class complexity23.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods14
▷ Static methods857.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions54
▷ Named functions54100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.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