83% wpjm-related-jobs

Code Review | WPJM Related Jobs

WordPress plugin WPJM Related Jobs scored83%from 54 tests.

About plugin

  • Plugin page: wpjm-related-jobs
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3
  • WordPress version: 6.3.1
  • First release: Feb 9, 2016
  • Latest release: Aug 15, 2023
  • Number of updates: 15
  • Update frequency: every 182.9 days
  • Top authors: tusharkapdi (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /4,923 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.97ms] Passed 4 tests

Analyzing server-side resources used by WPJM Related Jobs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.74 ▼1.28
Dashboard /wp-admin3.32 ▲0.0146.09 ▲0.56
Posts /wp-admin/edit.php3.37 ▲0.0142.62 ▼1.85
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.21 ▼9.31
Media Library /wp-admin/upload.php3.24 ▲0.0135.81 ▲1.04
Related Jobs /wp-admin/options-general.php?page=wpjm-realted-jobs-setting3.2129.12

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
wpjm_related_jobs
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WPJM Related Jobs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.19 ▼1.211.66 ▲0.0241.43 ▼0.91
Dashboard /wp-admin2,217 ▲264.87 ▼0.01107.34 ▼15.5440.81 ▲0.14
Posts /wp-admin/edit.php2,093 ▲11.97 ▼0.0036.59 ▼2.4632.28 ▼3.98
Add New Post /wp-admin/post-new.php1,537 ▼023.56 ▲0.68664.89 ▲18.6846.61 ▼25.36
Media Library /wp-admin/upload.php1,390 ▲54.21 ▼0.1198.22 ▼3.8541.39 ▼3.05
Related Jobs /wp-admin/options-general.php?page=wpjm-realted-jobs-setting9952.1423.0328.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpjm-related-jobs/includes/options-setting.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/wpjm-related-jobs/includes/wpse-or-query.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wpjm-related-jobs === )
  • Tags: There are too many tags (35 tag instead of maximum 10)
You can look at the official readme.txt

wpjm-related-jobs/wpjm-related-jobs.php 85% from 13 tests

The entry point to "WPJM Related Jobs" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • 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
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 162 characters long)

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
Good job! No executable or dangerous file extensions detected433 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP572117370
PO File1232462
CSS1001

PHP code Passed 2 tests

A short review of 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.29
Average class complexity9.50
▷ Minimum class complexity9.00
▷ Maximum class complexity10.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png20.31KB7.27KB▼ 64.23%
assets/screenshot-2.png31.80KB14.26KB▼ 55.15%