10% vacancy-lab

Code Review | Vacancy Lab

WordPress plugin Vacancy Lab scored 10% from 54 tests.

About plugin

  • Plugin page: vacancy-lab
  • Plugin version: 0.7
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 6.3.1
  • First release: Sep 3, 2018
  • Latest release: Aug 13, 2020
  • Number of updates: 22
  • Update frequency: every 39.4 days
  • Top authors: jarrettandlam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 738 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/vacancy-lab/wpvacancylab.php+94
    Methods with the same name as their class will not be constructors in a future version of PHP; Wpvacancylab_Widget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼57.89ms] Passed 4 tests

This is a short check of server-side resources used by Vacancy Lab
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.399.41 ▼41.56
Dashboard /wp-admin2.10 ▼1.216.23 ▼39.98
Posts /wp-admin/edit.php2.10 ▼1.268.31 ▼50.74
Add New Post /wp-admin/post-new.php2.10 ▼3.796.04 ▼99.29
Media Library /wp-admin/upload.php2.10 ▼1.136.44 ▼29.54
Vacancy Lab /wp-admin/options-general.php?page=wpvacancylab_plugin2.107.59

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: 3 new tables, 7 new options
New tables
tblvacancies_temp
candidates
tblvacancies
New WordPress options
widget_theysaidso_widget
widget_wpvacancylab_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Vacancy Lab
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.60 ▼0.995.60 ▲3.7342.35 ▼0.82
Dashboard /wp-admin2,213 ▲315.90 ▲0.0999.79 ▼10.0040.09 ▼4.97
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0338.83 ▼1.6837.45 ▼1.54
Add New Post /wp-admin/post-new.php1,523 ▲923.24 ▲5.62630.34 ▼50.1850.20 ▼12.40
Media Library /wp-admin/upload.php1,395 ▲134.18 ▼0.1097.40 ▲1.2543.35 ▼0.00
Vacancy Lab /wp-admin/options-general.php?page=wpvacancylab_plugin9652.1625.9528.18

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/vacancy-lab/wpvacancylab.php+94
    Methods with the same name as their class will not be constructors in a future version of PHP; Wpvacancylab_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • candidates
    • tblvacancies
    • tblvacancies_temp
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_wpvacancylab_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wpvacancylab_plugin
    • > Deprecated in wp-content/plugins/vacancy-lab/wpvacancylab.php+94
    Methods with the same name as their class will not be constructors in a future version of PHP; Wpvacancylab_Widget has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpvacancylab_plugin
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpvacancylab_plugin
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
    • > GET request to /wp-admin/options-general.php?page=wpvacancylab_plugin
    • > Notice in wp-content/plugins/vacancy-lab/inc/options-page-wrapper.php+124
    Undefined variable: wpvacancylab_user
    • > GET request to /wp-admin/options-general.php?page=wpvacancylab_plugin
    • > Notice in wp-content/plugins/vacancy-lab/inc/options-page-wrapper.php+128
    Undefined variable: wpvacancylab_password
    • > GET request to /wp-admin/options-general.php?page=wpvacancylab_plugin
    • > Notice in wp-content/plugins/vacancy-lab/inc/options-page-wrapper.php+149
    Undefined variable: wpvacancylab_vac_pageid
    • > GET request to /wp-admin/options-general.php?page=wpvacancylab_plugin
    • > Notice in wp-content/plugins/vacancy-lab/inc/options-page-wrapper.php+153
    Undefined variable: wpvacancylab_s_text
    • > GET request to /wp-admin/options-general.php?page=wpvacancylab_plugin
    • > Notice in wp-content/plugins/vacancy-lab/inc/options-page-wrapper.php+157
    Undefined variable: wpvacancylab_s_location
    • > GET request to /wp-admin/options-general.php?page=wpvacancylab_plugin
    • > Notice in wp-content/plugins/vacancy-lab/inc/options-page-wrapper.php+161
    Undefined variable: wpvacancylab_s_position
    • > GET request to /wp-admin/options-general.php?page=wpvacancylab_plugin
    • > Notice in wp-content/plugins/vacancy-lab/inc/options-page-wrapper.php+173
    Undefined variable: wpvacancylab_can_pageid

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (img1.png shows the search field), #2 (img2.png shows the candidate application form), #3 (img3.png shows the vacancies page)
You can take inspiration from this readme.txt

vacancy-lab/wpvacancylab.php 92% from 13 tests

"Vacancy Lab" version 0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("vacancy-lab.php" instead of "wpvacancylab.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,039 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP79197898
CSS141092
JavaScript15149

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/img2.png18.74KB8.38KB▼ 55.30%
img/img3.png32.27KB13.71KB▼ 57.53%
img/img1.png5.55KB3.10KB▼ 44.22%