10% horariodeapertura24

Code Review | Horario de apertura 24

WordPress plugin Horario de apertura 24 scored10%from 54 tests.

About plugin

  • Plugin page: horariodeapertura24
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.9
  • WordPress version: 6.3.1
  • First release: Oct 28, 2016
  • Latest release: Oct 28, 2016
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: seoptix (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,370 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/horariodeapertura24/wp-horariodeapertura24.php+77
    Methods with the same name as their class will not be constructors in a future version of PHP; Horariodeapertura24ScriptWidget has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼49.63ms] Passed 4 tests

A check of server-side resources used by Horario de apertura 24
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.42 ▼31.99
Dashboard /wp-admin2.10 ▼1.205.18 ▼41.00
Posts /wp-admin/edit.php2.10 ▼1.255.27 ▼41.56
Add New Post /wp-admin/post-new.php2.10 ▼3.785.67 ▼83.98
Media Library /wp-admin/upload.php2.10 ▼1.136.89 ▼27.69
WP horariodeapertura24 Script /wp-admin/options-general.php?page=wp_horariodeapertura24_script2.105.33

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Horario de apertura 24
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10613.39 ▼1.022.17 ▲0.4236.43 ▼9.14
Dashboard /wp-admin2,219 ▲304.90 ▼0.1097.11 ▼15.9936.89 ▼3.86
Posts /wp-admin/edit.php2,099 ▲102.04 ▲0.0433.38 ▼3.1035.02 ▲0.02
Add New Post /wp-admin/post-new.php1,532 ▼218.17 ▼4.81607.08 ▼37.6049.43 ▼11.58
Media Library /wp-admin/upload.php1,392 ▲44.26 ▼0.0597.52 ▲2.4241.13 ▼0.33
WP horariodeapertura24 Script /wp-admin/options-general.php?page=wp_horariodeapertura24_script6991.546.5719.10

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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/horariodeapertura24/wp-horariodeapertura24.php+77
    Methods with the same name as their class will not be constructors in a future version of PHP; Horariodeapertura24ScriptWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_horariodeapertura24_script

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wp_horariodeapertura24_script
    • > Deprecated in wp-content/plugins/horariodeapertura24/wp-horariodeapertura24.php+77
    Methods with the same name as their class will not be constructors in a future version of PHP; Horariodeapertura24ScriptWidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wp_horariodeapertura24_script
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Horariodeapertura24ScriptWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=wp_horariodeapertura24_script
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/horariodeapertura24/templates/settings.php on line 8 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/horariodeapertura24/templates/settings.php(8): do_settings_fields()
    #1 wp-content/plugins/horariodeapertura24/wp-horariodeapertura24.php(52): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): WP_Horariodeapertura24_Script->plugin_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/horariodeapertura24/wp-horariodeapertura24.php:77
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/horariodeapertura24/templates/settings.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 25 tag instead of maximum 10
  • Donate link: Invalid URI ("gracias, no es necesario")
The official readme.txt might help

horariodeapertura24/wp-horariodeapertura24.php 92% from 13 tests

"Horario de apertura 24" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("horariodeapertura24.php" instead of "wp-horariodeapertura24.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 detected1,611 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4421813
CSS3170516
PHP25111282

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.09
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods327.27%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
22 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/images/colorpicker_rgb_r.png1.04KB0.77KB▼ 26.17%
templates/images/custom_hsb_h.png0.95KB0.73KB▼ 23.40%
templates/images/custom_hex.png0.55KB0.39KB▼ 28.11%
templates/images/colorpicker_background.png1.85KB2.14KB0.00%
templates/images/colorpicker_rgb_b.png0.95KB0.76KB▼ 19.48%