77% job-postings

Code Review | Jobs for WordPress

WordPress plugin Jobs for WordPress scored77%from 54 tests.

About plugin

  • Plugin page: job-postings
  • Plugin version: 2.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 25, 2017
  • Latest release: May 19, 2023
  • Number of updates: 168
  • Update frequency: every 12.6 days
  • Top authors: blueglassinteractive (100%)

Code review

54 tests

User reviews

50 reviews

Install metrics

9,000+ active /138,520 total downloads

Benchmarks

Plugin footprint 83% 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: ▲1.11MB] [CPU: ▲5.64ms] Passed 4 tests

This is a short check of server-side resources used by Jobs for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.58 ▲1.1271.53 ▲32.38
Dashboard /wp-admin4.40 ▲1.1067.90 ▲11.42
Posts /wp-admin/edit.php4.47 ▲1.1161.05 ▲9.89
Add New Post /wp-admin/post-new.php7.00 ▲1.1196.38 ▼13.45
Media Library /wp-admin/upload.php4.33 ▲1.1056.36 ▲14.70
Settings /wp-admin/edit.php?post_type=jobs&page=jp-settings4.6558.88
Help /wp-admin/edit.php?post_type=jobs&page=jp-help4.3647.25
Add new position /wp-admin/post-new.php?post_type=jobs4.6172.96
Categories /wp-admin/edit-tags.php?taxonomy=jobs_category&post_type=jobs4.3351.04
All positions /wp-admin/edit.php?post_type=jobs4.3847.39
Job entries /wp-admin/edit.php?post_type=job-entry4.3846.84

Server storage [IO: ▲14.22MB] [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: 237 new files
Database: no new tables, 9 new options
New WordPress options
jobs_schema_type
theysaidso_admin_options
db_upgraded
jobs_posts_per_page
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
jobs_preview_cta
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Jobs for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲17813.31 ▼1.064.92 ▲3.1336.20 ▼6.16
Dashboard /wp-admin2,317 ▲1405.97 ▲0.41103.89 ▲12.7450.11 ▲1.97
Posts /wp-admin/edit.php2,224 ▲1212.46 ▲0.4341.67 ▼0.1038.86 ▲1.52
Add New Post /wp-admin/post-new.php1,614 ▲8623.37 ▲0.49728.86 ▲136.6336.91 ▼17.80
Media Library /wp-admin/upload.php1,519 ▲1194.32 ▲0.05116.54 ▲6.1051.57 ▲6.06
Settings /wp-admin/edit.php?post_type=jobs&page=jp-settings3,5514.4480.9494.28
Help /wp-admin/edit.php?post_type=jobs&page=jp-help1,5433.3750.42104.67
Add new position /wp-admin/post-new.php?post_type=jobs9,44116.89619.11214.24
Categories /wp-admin/edit-tags.php?taxonomy=jobs_category&post_type=jobs1,4122.1940.7345.66
All positions /wp-admin/edit.php?post_type=jobs1,1952.4236.1836.01
Job entries /wp-admin/edit.php?post_type=job-entry1,1902.4237.1836.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • jobs_posts_per_page
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • jobs_schema_type
    • jobs_preview_cta
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/job-postings/tcpdf/tools/tcpdf_addfont.php
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/job-postings/include/views/job-confirmation.php on line 4
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/job-postings/include/views/job-settings.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/job-postings/admin/tabs/fields.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/job-postings/include/views/job-confirmation.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/job-postings/templates/preview/job-preview.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/job-postings/include/views/job-settings.php:7
    • > PHP Notice
      Undefined variable: hide_empty in wp-content/plugins/job-postings/templates/include/job-categories.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/job-postings/include/views/job-notification.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/job-postings/templates/include/job-category-list.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/job-postings/tcpdf/tcpdf_include.php:27

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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: Add descriptions for screenshots #1, #10, #11, #2, #3, #4, #5, #6, #7, #8, #9 in job-postings/assets to your readme.txt
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
Please take inspiration from this readme.txt

job-postings/job-postings.php Passed 13 tests

The main PHP file in "Jobs for WordPress" ver. 2.6.2 adds more information about the plugin and also serves as the entry point for this plugin
103 characters long description:
WordPress plugin that make it easy to add job postings to your company’s website in a structured way.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin62,915 lines of code in 123 files:
LanguageFilesBlank linesComment linesLines of code
PHP753,91412,52653,506
CSS6533563,544
PO File51,1028103,426
JavaScript73281641,480
SVG2841849
Markdown121063
JSON10047

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 4,412)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity219.11
▷ Minimum class complexity1.00
▷ Maximum class complexity4,412.00
Average method complexity10.16
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes35
▷ Abstract classes12.86%
▷ Concrete classes3497.14%
▷ Final classes00.00%
Methods833
▷ Static methods21525.81%
▷ Public methods55566.63%
▷ Protected methods27833.37%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants142
▷ Global constants142100.00%
▷ Class constants00.00%
▷ Public constants00.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
47 PNG files occupy 2.45MB with 1.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/select2.png0.51KB0.33KB▼ 34.94%
admin/faq/faq-field-settings.png17.13KB4.79KB▼ 72.05%
assets/screenshot-9.png95.99KB28.25KB▼ 70.57%
admin/css/images/custom_hex.png0.55KB0.39KB▼ 28.11%
admin/css/images/colorpicker_rgb_r.png1.04KB0.77KB▼ 26.17%