73% mamurjor-employee-info

Code Review | Mamurjor Employee Info

WordPress plugin Mamurjor Employee Info scored73%from 54 tests.

About plugin

  • Plugin page: mamurjor-employee...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.0
  • WordPress version: 6.3.1
  • First release: May 4, 2020
  • Latest release: May 6, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: mamurjor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /378 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.23MB] [CPU: ▲1.37ms] Passed 4 tests

A check of server-side resources used by Mamurjor Employee Info
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2347.86 ▲9.65
Dashboard /wp-admin3.54 ▲0.2051.31 ▼21.71
Posts /wp-admin/edit.php3.66 ▲0.3054.14 ▲8.50
Add New Post /wp-admin/post-new.php6.13 ▲0.24108.00 ▲9.50
Media Library /wp-admin/upload.php3.47 ▲0.2444.11 ▲9.19
Employee Info /wp-admin/admin.php?page=employee3.4345.41
employee salary Print /wp-admin/admin.php?page=salaryprint3.4345.56
Department /wp-admin/admin.php?page=department3.4337.16
Designation /wp-admin/admin.php?page=designation3.4338.66
employee salary /wp-admin/admin.php?page=salary3.4337.47
Salary Grade /wp-admin/admin.php?page=sgrade3.4336.70
Education Info /wp-admin/admin.php?page=edu3.4338.30

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 43 new files
Database: 6 new tables, 6 new options
New tables
wp_mamurjor_sgrade
wp_monthly_salary
wp_mamurjor_emp_edu
wp_mamurjor_department
wp_mamurjor_employee
wp_mamurjor_designation
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Mamurjor Employee Info: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲20813.62 ▼0.848.55 ▲6.4642.64 ▼2.47
Dashboard /wp-admin2,274 ▲865.85 ▼0.02111.33 ▼4.6938.73 ▼7.23
Posts /wp-admin/edit.php2,160 ▲712.01 ▼0.0041.42 ▲4.9237.07 ▼0.71
Add New Post /wp-admin/post-new.php1,571 ▲5217.71 ▼5.40655.28 ▼13.2450.40 ▼6.05
Media Library /wp-admin/upload.php1,462 ▲774.23 ▼0.0794.62 ▼5.1841.99 ▼2.88
Employee Info /wp-admin/admin.php?page=employee9932.0323.4330.71
employee salary Print /wp-admin/admin.php?page=salaryprint9272.0524.5124.79
Department /wp-admin/admin.php?page=department8912.0625.1025.56
Designation /wp-admin/admin.php?page=designation8882.0624.4526.76
employee salary /wp-admin/admin.php?page=salary9772.0623.5329.42
Salary Grade /wp-admin/admin.php?page=sgrade9042.0422.8026.40
Education Info /wp-admin/admin.php?page=edu9092.0625.1330.77

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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
  • This plugin does not fully uninstall, leaving 6 tables in the database
    • wp_mamurjor_designation
    • wp_monthly_salary
    • wp_mamurjor_emp_edu
    • wp_mamurjor_employee
    • wp_mamurjor_department
    • wp_mamurjor_sgrade
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/mamurjor-employee-info/public/partials/mamurjor_employee_info-public-display.php
    • > /wp-content/plugins/mamurjor-employee-info/admin/partials/mamurjor_employee_info-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is stored in the /assets directory.), #2 (This is the second screen shot)
You can look at the official readme.txt

mamurjor-employee-info/mamurjor_employee_info.php 85% from 13 tests

The primary PHP file in "Mamurjor Employee Info" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mamurjor-employee-info.php" instead of "mamurjor_employee_info.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected10,214 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,2715,9405,310
CSS103762363,580
PHP186165651,324

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin