62% job-listings

Code Review | Job Listings

WordPress plugin Job Listings scored62%from 54 tests.

About plugin

  • Plugin page: job-listings
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7.5
  • WordPress version: 6.3.1
  • First release: May 24, 2017
  • Latest release: May 30, 2017
  • Number of updates: 4
  • Update frequency: every 1.8 days
  • Top authors: nootheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /966 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.16MB] [CPU: ▼45.61ms] Passed 4 tests

A check of server-side resources used by Job Listings
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.66 ▼0.808.02 ▼32.79
Dashboard /wp-admin2.90 ▼0.4016.43 ▼33.87
Posts /wp-admin/edit.php2.91 ▼0.4514.40 ▼38.91
Add New Post /wp-admin/post-new.php2.91 ▼2.9813.69 ▼76.86
Media Library /wp-admin/upload.php2.91 ▼0.3211.74 ▼23.02
Custom Fields /wp-admin/admin.php?page=jlt-custom-field-setting2.9115.01
Quick Setup /wp-admin/admin.php?page=jlt-basic-setup2.9113.26
Add New Application /wp-admin/post-new.php?post_type=application2.9114.56
Settings /wp-admin/admin.php?page=jlt-setting2.9113.31
Job Tag /wp-admin/edit-tags.php?taxonomy=job_tag&post_type=job2.9116.06
Job Type /wp-admin/edit-tags.php?taxonomy=job_type&post_type=job2.9112.34
Job Category /wp-admin/edit-tags.php?taxonomy=job_category&post_type=job2.9113.76
All Jobs /wp-admin/edit.php?post_type=job2.9114.53
Companies /wp-admin/edit.php?post_type=company2.9114.38
Addons /wp-admin/admin.php?page=job-listings-addons2.9115.77

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 417 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
jlt_job_insert_default_data
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
jlt_job_cron_jobs

Browser metrics Passed 4 tests

An overview of browser requirements for Job Listings
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,148 ▲41315.32 ▲1.0336.46 ▲34.5540.35 ▼8.30
Dashboard /wp-admin2,371 ▲1835.09 ▲0.18113.61 ▼3.5746.77 ▲3.11
Posts /wp-admin/edit.php2,282 ▲1962.45 ▲0.4444.26 ▲7.2536.05 ▲1.24
Add New Post /wp-admin/post-new.php1,651 ▲11817.52 ▼5.84612.57 ▼86.2647.57 ▼6.47
Media Library /wp-admin/upload.php1,561 ▲1734.35 ▲0.1399.69 ▼8.3944.35 ▼0.70
Custom Fields /wp-admin/admin.php?page=jlt-custom-field-setting1,6192.4244.7434.49
Quick Setup /wp-admin/admin.php?page=jlt-basic-setup1,0062.0529.6828.32
Add New Application /wp-admin/post-new.php?post_type=application2,2476.71162.9372.20
Settings /wp-admin/admin.php?page=jlt-setting1,0852.1333.8928.01
Job Tag /wp-admin/edit-tags.php?taxonomy=job_tag&post_type=job1,4112.3032.0131.40
Job Type /wp-admin/edit-tags.php?taxonomy=job_type&post_type=job1,5802.3947.4729.97
Job Category /wp-admin/edit-tags.php?taxonomy=job_category&post_type=job1,4392.3232.2730.19
All Jobs /wp-admin/edit.php?post_type=job1,3742.6039.4331.32
Companies /wp-admin/edit.php?post_type=company1,2812.7438.1429.50
Addons /wp-admin/admin.php?page=job-listings-addons1,2111.9327.9336.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/job-listings/includes/job/job_type.php+26
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • jlt_job_cron_jobs
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • jlt_job_insert_default_data

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=job-listings-addons
    • > Deprecated in wp-content/plugins/job-listings/includes/job/job_type.php+26
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=job-listings-addons
    • > Notice in wp-content/plugins/job-listings/includes/admin/setup-install.php+140
    Trying to access array offset on value of type bool
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=company
    • > Warning in wp-includes/class-wp-hook.php+310
    Parameter 2 to JLT_Company::search_by_title_only() expected to be a reference, value given
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=application
    • > Deprecated in wp-content/plugins/job-listings/includes/libs/meta-boxes/class-helper.php+175
    Function create_function() is deprecated

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/job-listings/templates/form/lost-password.php
    • > /wp-content/plugins/job-listings/templates/form_field/image.php
  • 86× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/job-listings/includes/forms/class-jlt-form-job-hander.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/job-listings/templates/form_field/textarea.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/job-listings/templates/form_field/select.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/job-listings/includes/email/setting_templates.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/job-listings/templates/member/update-password.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/job-listings/includes/libs/meta-boxes/testimonial-meta-box.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/job-listings/includes/member/candidate-default-fields.php:126
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/job-listings/includes/common/google-map/location.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/job-listings/templates/form_field/datepicker_search.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/job-listings/includes/job/job-query.php:168

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: job board, job manager, employment, job listings, job management

job-listings/job-listings.php 92% from 13 tests

The primary PHP file in "Job Listings" version 0.1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin40,335 lines of code in 360 files:
LanguageFilesBlank linesComment linesLines of code
PHP1823,7202,42817,432
JavaScript1511,9602,37112,990
CSS247203415,989
SVG1002,671
Sass195111,252
JSON1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity38.33
▷ Minimum class complexity1.00
▷ Maximum class complexity137.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods301
▷ Static methods9531.56%
▷ Public methods27892.36%
▷ Protected methods31.00%
▷ Private methods206.64%
Functions460
▷ Named functions460100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants763.64%
▷ Class constants436.36%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
39 PNG files occupy 0.22MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/ui-bg_glass_100_fdf5ce_1x400.png0.34KB0.16KB▼ 54.02%
public/vendor/chosen/docsupport/oss-credit.png4.30KB3.26KB▼ 24.02%
public/css/chosen-sprite.png0.63KB0.88KB0.00%
public/images/map-marker-icon.png1.83KB1.33KB▼ 27.67%
public/vendor/nivo-lightbox/themes/default/close@2x.png3.02KB0.34KB▼ 88.83%