10% mi-libreria

Code Review | Mi librería

WordPress plugin Mi librería scored 10% from 54 tests.

About plugin

  • Plugin page: mi-libreria
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 5.8.1
  • First release: Apr 20, 2015
  • Latest release: Jan 6, 2016
  • Number of updates: 29
  • Update frequency: every 9.1 days
  • Top authors: yeswework (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 1,827 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/mi-libreria/inc/prh-ml-admin.php+61
    Function create_function() is deprecated

Server metrics [RAM: ▼1.89MB] [CPU: ▼215.86ms] Passed 4 tests

Server-side resources used by Mi librería
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.74 ▼0.985.85 ▼14.99
Dashboard /wp-admin1.76 ▼1.295.28 ▼39.26
Posts /wp-admin/edit.php1.76 ▼1.355.42 ▼38.21
Add New Post /wp-admin/post-new.php1.76 ▼3.674.66 ▼761.27
Media Library /wp-admin/upload.php1.76 ▼1.249.83 ▼24.68
Mi librería /wp-admin/options-general.php?page=prh_ml1.765.66

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 2 new options
New WordPress options
widget_wp_prh_ml
prh_ml_options

Browser metrics Passed 4 tests

Mi librería: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲12715.79 ▲0.237.44 ▼1.0345.15 ▼0.71
Dashboard /wp-admin3,015 ▲845.95 ▼0.02135.04 ▼13.46105.44 ▼5.65
Posts /wp-admin/edit.php2,759 ▲202.69 ▲0.0063.30 ▲2.1589.93 ▼1.72
Add New Post /wp-admin/post-new.php1,606 ▼6614.82 ▼4.04365.05 ▼32.85114.38 ▲0.59
Media Library /wp-admin/upload.php1,827 ▲174.97 ▼0.07160.78 ▲14.51128.01 ▲9.42
Mi librería /wp-admin/options-general.php?page=prh_ml1,2792.4761.9890.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/mi-libreria/inc/prh-ml-admin.php+61
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 2 options in the database
    • widget_wp_prh_ml
    • prh_ml_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=prh_ml
    • > Deprecated in wp-content/plugins/mi-libreria/inc/prh-ml-admin.php+61
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=prh_ml
    • > Notice in wp-content/plugins/mi-libreria/inc/prh-ml-options.php+158
    Undefined index: prh_ml_display
    • > GET request to /wp-admin/options-general.php?page=prh_ml
    • > Notice in wp-content/plugins/mi-libreria/inc/prh-ml-options.php+165
    Undefined index: prh_ml_show_link

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mi-libreria/inc/prh-ml-front-ajax.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mi-libreria/inc/prh-ml-options.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mi-libreria/inc/prh-ml-admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mi-libreria/inc/prh-ml-front.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mi-libreria/inc/prh-ml-metabox-ajax.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mi-libreria/inc/prh-ml-admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mi-libreria/inc/prh-ml-metabox.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === mi-libreria === )
  • Screenshots: Add descriptions for screenshots #2, #3 in mi-libreria/assets to your readme.txt
The official readme.txt might help

mi-libreria/prh-mi-libreria.php 85% from 13 tests

The primary PHP file in "Mi librería" version 1.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 219 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("mi-libreria.php" instead of "prh-mi-libreria.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected2,382 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP112952532,043
JavaScript3141106199
CSS3624140

PHP code Passed 2 tests

An overview 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.50
Average class complexity50.50
▷ Minimum class complexity2.00
▷ Maximum class complexity99.00
Average method complexity8.62
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.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
PNG images were not found in this plugin