78% hr-press-lite

Code Review | Hr Press Lite

WordPress plugin Hr Press Lite scored 78% from 54 tests.

About plugin

  • Plugin page: hr-press-lite
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 19, 2022
  • Latest release: Jan 18, 2023
  • Number of updates: 5
  • Update frequency: every 6.6 days
  • Top authors: codeclove (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 332 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.57MB] [CPU: ▼4.94ms] Passed 4 tests

This is a short check of server-side resources used by Hr Press Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.56 ▼6.16
Dashboard /wp-admin4.06 ▲0.7550.36 ▲3.21
Posts /wp-admin/edit.php4.11 ▲0.7547.82 ▼3.94
Add New Post /wp-admin/post-new.php6.57 ▲0.6987.88 ▼12.87
Media Library /wp-admin/upload.php3.91 ▲0.6938.78 ▲5.87
Announcements /wp-admin/admin.php?page=wp_hrp_announcements3.9239.95
Employees /wp-admin/admin.php?page=wp_hrp_employees3.9243.99
Designations /wp-admin/admin.php?page=wp_hrp_designations3.9239.46
Departments /wp-admin/admin.php?page=wp_hrp_departments3.9239.97
Dashboard /wp-admin/admin.php?page=hr_press3.9742.79
Shifts /wp-admin/admin.php?page=wp_hrp_shifts3.9239.20
Attendance /wp-admin/admin.php?page=wp_hrp_attendances3.9238.12
Settings /wp-admin/admin.php?page=wp_hrp_settings3.9743.01
Holidays /wp-admin/admin.php?page=wp_hrp_holidays3.9237.90

Server storage [IO: ▲4.03MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 75 new files
Database: 8 new tables, 6 new options
New tables
wp_hrp_announcements
wp_hrp_settings
wp_hrp_attendances
wp_hrp_holidays
wp_hrp_shifts
wp_hrp_employees
wp_hrp_designations
wp_hrp_departments
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Hr Press Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲9413.30 ▼1.086.17 ▲3.9739.04 ▼5.62
Dashboard /wp-admin2,254 ▲635.82 ▲0.93100.01 ▼7.2938.39 ▼2.80
Posts /wp-admin/edit.php2,137 ▲452.00 ▼0.0433.69 ▼6.9933.84 ▼2.26
Add New Post /wp-admin/post-new.php1,554 ▲4017.89 ▲0.27649.69 ▲16.9961.03 ▲4.86
Media Library /wp-admin/upload.php1,442 ▲514.16 ▼0.0495.11 ▼5.7442.20 ▼3.21
Announcements /wp-admin/admin.php?page=wp_hrp_announcements1,6784.46110.9273.02
Employees /wp-admin/admin.php?page=wp_hrp_employees1,7575.84110.1335.78
Designations /wp-admin/admin.php?page=wp_hrp_designations1,6325.5390.2935.00
Departments /wp-admin/admin.php?page=wp_hrp_departments1,6555.8691.7633.35
Dashboard /wp-admin/admin.php?page=hr_press1,5613.9455.8945.03
Shifts /wp-admin/admin.php?page=wp_hrp_shifts1,6786.2296.3435.48
Attendance /wp-admin/admin.php?page=wp_hrp_attendances1,6205.48101.4333.48
Settings /wp-admin/admin.php?page=wp_hrp_settings2,2824.4265.3242.12
Holidays /wp-admin/admin.php?page=wp_hrp_holidays1,7014.63106.0037.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 tables in the database
    • wp_hrp_departments
    • wp_hrp_settings
    • wp_hrp_employees
    • wp_hrp_shifts
    • wp_hrp_designations
    • wp_hrp_attendances
    • wp_hrp_holidays
    • wp_hrp_announcements
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6 in hr-press-lite/assets to your readme.txt
You can look at the official readme.txt

hr-press-lite/HR_Press.php 62% from 13 tests

The main file in "Hr Press Lite" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hr-press-lite.php" instead of "HR_Press.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 356 characters long)
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.6" instead of "7.0")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.2" instead of "5.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin47,635 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
CSS24,25110431,762
JavaScript142,2397,2378,132
PHP518242296,700
SVG1001,041

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity70.38
▷ Minimum class complexity1.00
▷ Maximum class complexity448.00
Average method complexity4.85
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods144
▷ Static methods13895.83%
▷ Public methods14197.92%
▷ Protected methods00.00%
▷ Private methods32.08%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants1684.21%
▷ Class constants315.79%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/images/person.png2.64KB0.00KB▼ 100.00%