10% wp-job-manager-shortwidget

Code Review | WP Job Manager ShortWidget

WordPress plugin WP Job Manager ShortWidget scored10%from 54 tests.

About plugin

  • Plugin page: wp-job-manager-sh...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 14, 2014
  • Latest release: Jul 15, 2014
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: tripflex (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /4,490 total downloads

Benchmarks

Plugin footprint 40% 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/wp-job-manager-shortwidget/includes/widget-job.php+308
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.67ms] Passed 4 tests

Analyzing server-side resources used by WP Job Manager ShortWidget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.94 ▼32.51
Dashboard /wp-admin2.05 ▼1.265.12 ▼42.48
Posts /wp-admin/edit.php2.05 ▼1.315.24 ▼44.73
Add New Post /wp-admin/post-new.php2.05 ▼3.845.14 ▼82.97
Media Library /wp-admin/upload.php2.05 ▼1.185.89 ▼30.93

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 44 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
widget_job_field-id
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_job-id
widget_recent-comments
widget_jobs-id
widget_job_summary-id

Browser metrics Passed 4 tests

Checking browser requirements for WP Job Manager ShortWidget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.181.64 ▲0.1736.19 ▼6.07
Dashboard /wp-admin2,195 ▲185.63 ▲0.0594.58 ▲9.6442.03 ▼0.57
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0141.08 ▲3.8735.64 ▼3.30
Add New Post /wp-admin/post-new.php1,635 ▲10923.14 ▲0.25684.64 ▼26.9537.65 ▼17.72
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.1391.93 ▼24.0040.82 ▼6.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-job-manager-shortwidget/includes/widget-job.php+308
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_job-id
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_jobs-id
    • widget_job_field-id
    • widget_job_summary-id
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

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
The following issues need your attention
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-job-manager-shortwidget/includes/field-textfield.php
    • > /wp-content/plugins/wp-job-manager-shortwidget/includes/field-dropdown.php
    • > /wp-content/plugins/wp-job-manager-shortwidget/includes/element-jobs.php
    • > /wp-content/plugins/wp-job-manager-shortwidget/includes/element-submit_job_form.php
  • 56× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/wp-job-manager-shortwidget/configs/fieldgroups-job_field.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-job-manager-shortwidget/configs/jobs-categories.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-job-manager-shortwidget/configs/jobs-ordering.php:15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-job-manager-shortwidget/includes/field-posttypeselector.php on line 3
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/wp-job-manager-shortwidget/includes/field-dropdown.php on line 20
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/wp-job-manager-shortwidget/includes/element-job.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-job-manager-shortwidget/configs/jobs-filtering.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-job-manager-shortwidget/configs/jobs-pagination.php:15
    • > PHP Notice
      Undefined variable: groupid in wp-content/plugins/wp-job-manager-shortwidget/includes/field-textfield.php on line 1
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/wp-job-manager-shortwidget/includes/field-posttypeselector.php on line 3

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

wp-job-manager-shortwidget/plugincore.php 92% from 13 tests

This is the main PHP file of "WP Job Manager ShortWidget" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-job-manager-shortwidget.php" instead of "plugincore.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,650 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP304747371,816
CSS4328607
JavaScript52423202
PO File10015
Markdown111010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity51.33
▷ Minimum class complexity33.00
▷ Maximum class complexity106.00
Average method complexity5.03
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods75
▷ Static methods1824.00%
▷ Public methods7194.67%
▷ Protected methods00.00%
▷ Private methods45.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/white.png0.67KB0.67KB0.00%
assets/images/icon.png0.75KB0.50KB▼ 33.25%