93% wp-staffing-customizer-for-wp-job-manager

Code Review | WP Staffing Customizer for WP Job Manager

WordPress plugin WP Staffing Customizer for WP Job Manager scored 93% from 54 tests.

About plugin

  • Plugin page: wp-staffing-custo...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-4.9
  • WordPress version: 5.8.1
  • First release: Aug 28, 2018
  • Latest release: Aug 29, 2018
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: petertdavid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 790 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.13MB] [CPU: ▼140.35ms] Passed 4 tests

This is a short check of server-side resources used by WP Staffing Customizer for WP Job Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.1433.90 ▼0.68
Dashboard /wp-admin3.19 ▲0.1448.80 ▲2.48
Posts /wp-admin/edit.php3.30 ▲0.2048.61 ▲5.10
Add New Post /wp-admin/post-new.php5.55 ▲0.1289.77 ▼564.31
Media Library /wp-admin/upload.php3.14 ▲0.1332.97 ▲1.13

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 33 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP Staffing Customizer for WP Job Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲22316.31 ▲0.8013.44 ▲1.3846.85 ▼1.82
Dashboard /wp-admin2,977 ▲435.89 ▼0.06152.57 ▼8.58105.11 ▼1.63
Posts /wp-admin/edit.php2,746 ▲72.72 ▼0.0165.21 ▼3.0687.09 ▲6.48
Add New Post /wp-admin/post-new.php1,688 ▲518.50 ▼0.24392.22 ▼11.83107.47 ▲2.17
Media Library /wp-admin/upload.php1,814 ▲45.04 ▲0.00153.03 ▼10.75109.89 ▼4.01

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-staffing-customizer-for-wp-job-manager/public/partials/wp-staffing-customizer-public-display.php
    • > /wp-content/plugins/wp-staffing-customizer-for-wp-job-manager/admin/partials/wp-staffing-customizer-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (26 tag instead of maximum 10)
The official readme.txt is a good inspiration

wp-staffing-customizer-for-wp-job-manager/wp-staffing-customizer.php 77% from 13 tests

The main PHP script in "WP Staffing Customizer for WP Job Manager" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-staffing-customizer-for-wp-job-manager.php" instead of "wp-staffing-customizer.php")
  • Description: The description should be shorter than 140 characters (currently 164 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected540 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13236647475
CSS28851
JavaScript262714

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods39
▷ Static methods25.13%
▷ Public methods3487.18%
▷ Protected methods00.00%
▷ Private methods512.82%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.29MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png47.94KB27.51KB▼ 42.62%
screenshot-3.png57.35KB38.69KB▼ 32.54%
screenshot-4.png25.96KB16.98KB▼ 34.60%
screenshot-2.png30.49KB18.49KB▼ 39.36%
screenshot-6.png72.03KB43.09KB▼ 40.17%