74% control-horas

Code Review | Control horas

WordPress plugin Control horas scored74%from 54 tests.

About plugin

  • Plugin page: control-horas
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: May 25, 2019
  • Latest release: Nov 22, 2022
  • Number of updates: 14
  • Update frequency: every 91.2 days
  • Top authors: cesarmaeso (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /3,335 total downloads

Benchmarks

Plugin footprint 65% 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: ▼4.05ms] Passed 4 tests

An overview of server-side resources used by Control horas
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.04 ▲1.14
Dashboard /wp-admin3.34 ▼0.0147.12 ▼9.13
Posts /wp-admin/edit.php3.39 ▲0.0346.67 ▲0.24
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.56 ▼8.44
Media Library /wp-admin/upload.php3.26 ▲0.0338.68 ▲3.78

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 19 new files
Database: 2 new tables, 6 new options
New tables
wp_ch_fichajes
wp_ch_pausas
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Control horas: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.27 ▼1.362.17 ▲0.4342.19 ▲0.94
Dashboard /wp-admin2,240 ▲544.86 ▼0.12100.82 ▼4.0041.25 ▼1.97
Posts /wp-admin/edit.php2,123 ▲372.03 ▲0.0634.80 ▼1.4832.81 ▼2.37
Add New Post /wp-admin/post-new.php1,551 ▲3722.98 ▲5.42645.82 ▼7.8561.18 ▲6.89
Media Library /wp-admin/upload.php1,419 ▲314.25 ▲0.06124.03 ▲23.4153.87 ▲8.10

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
These items require your attention
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_ch_pausas
    • wp_ch_fichajes
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× 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/control-horas/control-horas.php:431

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: laboral, fichar, horas, horario, control

control-horas/control-horas.php Passed 13 tests

"Control horas" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
Control de la jornada laboral de los trabajadores.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,204 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP6210658995
JavaScript104162
CSS210337
Markdown22010

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.27
Average class complexity15.67
▷ Minimum class complexity8.00
▷ Maximum class complexity23.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods56
▷ Static methods47.14%
▷ Public methods5496.43%
▷ Protected methods11.79%
▷ Private methods11.79%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ 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
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sort_desc_disabled.png0.14KB0.25KB0.00%
assets/images/sort_asc_disabled.png0.14KB0.25KB0.00%
assets/images/sort_asc.png0.16KB0.25KB0.00%
assets/images/sort_desc.png0.15KB0.25KB0.00%
assets/images/sort_both.png0.20KB0.29KB0.00%