62% grand-job

Code Review | Grand Job

WordPress plugin Grand Job scored62%from 54 tests.

About plugin

  • Plugin page: grand-job
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Sep 6, 2019
  • Latest release: Jul 7, 2022
  • Number of updates: 49
  • Update frequency: every 21.1 days
  • Top authors: hovanesvn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,617 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.54MB] [CPU: ▲25.60ms] Passed 4 tests

Server-side resources used by Grand Job
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /7.57 ▲4.1161.78 ▲21.06
Dashboard /wp-admin7.96 ▲4.6680.72 ▲32.25
Posts /wp-admin/edit.php8.10 ▲4.7477.35 ▲30.51
Add New Post /wp-admin/post-new.php11.27 ▲5.39117.44 ▲18.56
Media Library /wp-admin/upload.php7.88 ▲4.6573.07 ▲37.49
Categories /wp-admin/edit-tags.php?taxonomy=gj_cat&post_type=gj_employer7.8759.27
Gender /wp-admin/edit-tags.php?taxonomy=gj_gender&post_type=gj_candidate7.8768.58
Fields /wp-admin/edit.php?post_type=gj_job&page=gj-fields-page8.2467.48
Gender /wp-admin/edit-tags.php?taxonomy=gj_gender&post_type=gj_job7.8770.58
Cities /wp-admin/edit-tags.php?taxonomy=gj_city&post_type=gj_employer7.9670.59
Skills /wp-admin/edit-tags.php?taxonomy=gj_skill&post_type=gj_candidate7.8773.46
Categories /wp-admin/edit-tags.php?taxonomy=gj_cat&post_type=gj_candidate7.8765.27
Levels /wp-admin/edit-tags.php?taxonomy=gj_level&post_type=gj_candidate7.8758.39
Jobs /wp-admin/edit.php?post_type=gj_job7.9763.81
Skills /wp-admin/edit-tags.php?taxonomy=gj_skill&post_type=gj_job7.8771.72

Server storage [IO: ▲8.11MB] [DB: ▲0.11MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 419 new files
Database: 4 new tables, 20 new options
New tables
wp_gj_email_queue
wp_gj_save_jobs
wp_gj_follows
wp_gj_save_resums
New WordPress options
widget_gj_employer_filter
widget_recent-posts
gj_send_mail_queue_time
widget_gj_candidate_filter
widget_theysaidso_widget
gj_created_fields
widget_gj_job_apply
widget_recent-comments
widget_gj_employer_infomation
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Grand Job
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,391 ▲63015.15 ▲0.5919.70 ▲18.0041.79 ▼3.95
Dashboard /wp-admin2,440 ▲2605.63 ▼0.0398.03 ▲12.6141.00 ▲2.53
Posts /wp-admin/edit.php2,345 ▲2852.57 ▲0.5839.33 ▲0.3233.29 ▲2.27
Add New Post /wp-admin/post-new.php1,718 ▲19222.66 ▼0.55625.02 ▼9.1332.45 ▼16.44
Media Library /wp-admin/upload.php1,645 ▲2455.14 ▲0.98104.54 ▼2.5443.32 ▲0.89
Categories /wp-admin/edit-tags.php?taxonomy=gj_cat&post_type=gj_employer1,5162.4735.8627.12
Gender /wp-admin/edit-tags.php?taxonomy=gj_gender&post_type=gj_candidate1,5192.5143.6134.59
Fields /wp-admin/edit.php?post_type=gj_job&page=gj-fields-page1,7245.5885.6034.92
Gender /wp-admin/edit-tags.php?taxonomy=gj_gender&post_type=gj_job1,5222.4938.7732.36
Cities /wp-admin/edit-tags.php?taxonomy=gj_city&post_type=gj_employer3,1195.4799.3834.68
Skills /wp-admin/edit-tags.php?taxonomy=gj_skill&post_type=gj_candidate1,5152.6537.6932.48
Categories /wp-admin/edit-tags.php?taxonomy=gj_cat&post_type=gj_candidate1,5162.5036.1930.79
Levels /wp-admin/edit-tags.php?taxonomy=gj_level&post_type=gj_candidate1,4872.6439.1632.38
Jobs /wp-admin/edit.php?post_type=gj_job1,3572.5443.0433.60
Skills /wp-admin/edit-tags.php?taxonomy=gj_skill&post_type=gj_job1,5122.6443.0134.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_gj_save_jobs
    • wp_gj_save_resums
    • wp_gj_follows
    • wp_gj_email_queue
  • Zombie WordPress options were found after uninstall: 20 options
    • widget_theysaidso_widget
    • widget_gj_candidate_contact_form
    • gj_send_mail_queue_time
    • widget_gj_job_filter
    • widget_gj_job_infomation
    • theysaidso_admin_options
    • widget_gj_candidate_filter
    • gj_version
    • widget_gj_employer_infomation
    • widget_gj_employer_filter
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/edit-tags.php?taxonomy=gj_city&post_type=gj_employer
    • > Notice in wp-content/plugins/grand-job/includes/fields/fields.php+216
    Trying to access array offset on value of type null

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 take a closer look at the following
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/grand-job/templates/parts/employers/form-search.php
    • > /wp-content/plugins/grand-job/templates/parts/jobs/form-search.php
    • > /wp-content/plugins/grand-job/templates/parts/candidates/form-search.php
    • > /wp-content/plugins/grand-job/templates/register-popup.php
  • 416× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      include_once(GJ_PLUGIN_DIRincludes/class/shortcodes.class.php): failed to open stream: No such file or directory in wp-content/plugins/grand-job/includes/front.class.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/grand-job/templates/dashboard/job/form.php:14
    • > PHP Warning
      include_once(GJ_PLUGIN_DIRincludes/class/email-queue.class.php): failed to open stream: No such file or directory in wp-content/plugins/grand-job/includes/front.class.php on line 20
    • > PHP Warning
      include_once(GJ_PLUGIN_DIRincludes/fields/types/selectAdvanced.php): failed to open stream: No such file or directory in wp-content/plugins/grand-job/includes/front.class.php on line 53
    • > PHP Warning
      include_once(GJ_PLUGIN_DIRincludes/fields/types/post.php): failed to open stream: No such file or directory in wp-content/plugins/grand-job/includes/front.class.php on line 55
    • > PHP Warning
      Use of undefined constant GJ_PLUGIN_DIR - assumed 'GJ_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/grand-job/includes/front.class.php on line 23
    • > PHP Warning
      Use of undefined constant GJ_PLUGIN_DIR - assumed 'GJ_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/grand-job/includes/front.class.php on line 48
    • > PHP Warning
      include_once(GJ_PLUGIN_DIRincludes/class/job.class.php): failed to open stream: No such file or directory in wp-content/plugins/grand-job/includes/front.class.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/grand-job/templates/verify-account/form.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'ParseCsv\\enums\\AbstractEnum' not found in wp-content/plugins/grand-job/includes/libs/parsecsv/vendor/parsecsv/php-parsecsv/src/enums/SortEnum.php:5

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 25 tag instead of maximum 10
You can look at the official readme.txt

grand-job/gjob.php 85% from 13 tests

The entry point to "Grand Job" version 1.2.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("grand-job.php" instead of "gjob.php")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin78,325 lines of code in 327 files:
LanguageFilesBlank linesComment linesLines of code
PHP2404,8103,77229,676
CSS3376446120,960
JavaScript383,6292,42017,373
SVG530129,195
JSON500548
HTML1110339
Markdown1490153
XML21454
YAML13015
make13012

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity26.06
▷ Minimum class complexity1.00
▷ Maximum class complexity259.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces7
Interfaces0
Traits1
Classes126
▷ Abstract classes53.97%
▷ Concrete classes12196.03%
▷ Final classes00.00%
Methods1,284
▷ Static methods35327.49%
▷ Public methods1,19492.99%
▷ Protected methods705.45%
▷ Private methods201.56%
Functions154
▷ Named functions11373.38%
▷ Anonymous functions4126.62%
Constants25
▷ Global constants936.00%
▷ Class constants1664.00%
▷ Public constants16100.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
36 PNG files occupy 0.31MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/review-stars.png3.68KB2.01KB▼ 45.37%
assets/img/close.png15.11KB0.11KB▼ 99.30%
assets/images/m/2.png3.18KB2.36KB▼ 25.77%
assets/fancybox/fancybox_sprite@2x.png6.40KB5.76KB▼ 9.96%
assets/img/bank.png3.19KB1.74KB▼ 45.45%