68% hr-performance

Code Review | HR Performance

WordPress plugin HR Performance scored68%from 54 tests.

About plugin

  • Plugin page: hr-performance
  • Plugin version: 1.0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.1-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 23, 2020
  • Latest release: Jan 5, 2022
  • Number of updates: 7
  • Update frequency: every 58.3 days
  • Top authors: innovs (71.43%)theinnovs (42.86%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,514 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.96ms] Passed 4 tests

This is a short check of server-side resources used by HR Performance
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.73 ▼3.20
Dashboard /wp-admin3.31 ▲0.0047.06 ▼4.14
Posts /wp-admin/edit.php3.36 ▲0.0049.12 ▼5.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.41 ▼17.42
Media Library /wp-admin/upload.php3.23 ▲0.0033.98 ▼4.62

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 29 new files
Database: 3 new tables, 7 new options
New tables
wp_innovs_hr_performance_comments
wp_innovs_hr_performance_goal
wp_innovs_hr_performance
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
hr_performance_install_time
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by HR Performance
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.112.14 ▲0.0845.65 ▼0.33
Dashboard /wp-admin2,200 ▲95.79 ▲0.92101.12 ▼1.2941.65 ▲1.01
Posts /wp-admin/edit.php2,086 ▼32.01 ▲0.0139.52 ▼0.0937.65 ▲2.46
Add New Post /wp-admin/post-new.php1,514 ▼1917.49 ▼5.66652.07 ▼24.3751.77 ▼1.41
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0195.47 ▼21.4444.00 ▼7.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie tables were found after uninstall: 3 tables
    • wp_innovs_hr_performance
    • wp_innovs_hr_performance_goal
    • wp_innovs_hr_performance_comments
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • hr_performance_install_time
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/hr-performance/admin/partials/hr-performance-admin-display.php
    • > /wp-content/plugins/hr-performance/public/partials/hr-performance-public-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hr-performance/admin/partials/edit/hr-performance.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hr-performance/admin/partials/add/hr-performance.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Hr_performance_functions' not found in wp-content/plugins/hr-performance/admin/partials/hr-performance.php:4

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 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in hr-performance/assets to your readme.txt
The official readme.txt is a good inspiration

hr-performance/hr-performance.php Passed 13 tests

The main PHP file in "HR Performance" ver. 1.0.0.2 adds more information about the plugin and also serves as the entry point for this plugin
51 characters long description:
Evaluate the performance of Human Resources easily.

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
Good job! No executable or dangerous file extensions detected1,435 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP183025851,260
JavaScript359102159
CSS253116

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods36
▷ Static methods822.22%
▷ Public methods2980.56%
▷ Protected methods00.00%
▷ Private methods719.44%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected