62% info-alcaide-biblioteca

Code Review | Biblioteca Alcaide

WordPress plugin Biblioteca Alcaide scored62%from 54 tests.

About plugin

  • Plugin page: info-alcaide-bibl...
  • Plugin version: 20.1.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 20.1.6-20.1.6
  • WordPress version: 6.3.1
  • First release: Mar 11, 2019
  • Latest release: Mar 26, 2019
  • Number of updates: 18
  • Update frequency: every 26.4 days
  • Top authors: alcaide (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,957 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.84ms] Passed 4 tests

A check of server-side resources used by Biblioteca Alcaide
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.01 ▼0.21
Dashboard /wp-admin3.38 ▲0.0746.65 ▼1.42
Posts /wp-admin/edit.php3.49 ▲0.1347.46 ▼10.51
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.87 ▼11.20
Media Library /wp-admin/upload.php3.30 ▲0.0733.55 ▲0.29
Agregar Libro /wp-admin/admin.php?page=submenu23.2429.96
Biblioteca /wp-admin/admin.php?page=submenu3.2427.92
Agregar Materia /wp-admin/admin.php?page=submenu33.2628.44

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: 2 new tables, 6 new options
New tables
wp_info_alcaide_biblioteca_tabla_materias
wp_info_alcaide_biblioteca
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Biblioteca Alcaide
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8913.18 ▼1.492.02 ▲0.1035.63 ▼7.38
Dashboard /wp-admin2,237 ▲524.93 ▲0.06109.72 ▼9.3437.60 ▼10.80
Posts /wp-admin/edit.php2,123 ▲342.06 ▲0.0335.72 ▼5.0732.07 ▲0.95
Add New Post /wp-admin/post-new.php1,558 ▲3723.03 ▼0.17662.61 ▲42.2460.63 ▼5.78
Media Library /wp-admin/upload.php1,422 ▲344.18 ▼0.01102.51 ▲2.5348.38 ▲4.92
Agregar Libro /wp-admin/admin.php?page=submenu21,0612.1930.3561.89
Biblioteca /wp-admin/admin.php?page=submenu9382.1928.4527.27
Agregar Materia /wp-admin/admin.php?page=submenu39532.2026.7129.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_info_alcaide_biblioteca_tabla_materias
    • wp_info_alcaide_biblioteca
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=submenu2
    • > Notice in wp-content/plugins/info-alcaide-biblioteca/admin/info_alcaide_biblioteca_admin.php+216
    Undefined variable: info_alcaide_biblioteca_autor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=submenu2
    • > Notice in wp-content/plugins/info-alcaide-biblioteca/admin/info_alcaide_biblioteca_admin.php+185
    Undefined variable: info_alcaide_biblioteca_materia
    • > GET request to /wp-admin/admin.php?page=submenu
    • > Notice in wp-content/plugins/info-alcaide-biblioteca/admin/info_alcaide_biblioteca_admin.php+16
    Undefined index: borrar_libro
    • > GET request to /wp-admin/admin.php?page=submenu
    • > Notice in wp-content/plugins/info-alcaide-biblioteca/admin/info_alcaide_biblioteca_admin.php+17
    Undefined index: link
    • > GET request to /wp-admin/admin.php?page=submenu
    • > Notice in wp-content/plugins/info-alcaide-biblioteca/admin/info_alcaide_biblioteca_admin.php+30
    Undefined index: borrar_libro_ok

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/info-alcaide-biblioteca/admin/info_alcaide_biblioteca_admin_materias.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/info-alcaide-biblioteca/info_alcaide_biblioteca.php:44
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/info-alcaide-biblioteca/info_alcaide_biblioteca.php on line 21
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/info-alcaide-biblioteca/info_alcaide_biblioteca.php on line 20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === info-alcaide-biblioteca === )
You can look at the official readme.txt

info-alcaide-biblioteca/info_alcaide_biblioteca.php 92% from 13 tests

"Biblioteca Alcaide" version 20.1.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("info-alcaide-biblioteca.php" instead of "info_alcaide_biblioteca.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin462 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4172104458
JavaScript2063
CSS1051

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin