94% civic-job-posting

Code Review | Civic Job Posting

WordPress plugin Civic Job Posting scored 94% from 54 tests.

About plugin

  • Plugin page: civic-job-posting
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 5.8.1
  • First release: May 2, 2019
  • Latest release: Nov 15, 2019
  • Number of updates: 22
  • Update frequency: every 9.3 days
  • Top authors: tasoscivicuk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 412 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▼139.39ms] Passed 4 tests

A check of server-side resources used by Civic Job Posting
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.33 ▲0.6137.88 ▲17.54
Dashboard /wp-admin3.55 ▲0.5045.64 ▲1.17
Posts /wp-admin/edit.php3.60 ▲0.4942.77 ▼2.65
Add New Post /wp-admin/post-new.php5.93 ▲0.5093.53 ▼561.12
Media Library /wp-admin/upload.php3.43 ▲0.4336.79 ▲5.03
Job Posting /wp-admin/edit.php?post_type=civic-job-posting3.5437.05
Category /wp-admin/edit-tags.php?taxonomy=cjp_category&post_type=civic-job-posting3.4636.79
Add New Job Posting /wp-admin/post-new.php?post_type=civic-job-posting3.7155.74

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Civic Job Posting
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,749 ▲15315.86 ▲0.329.82 ▼0.2451.02 ▲6.36
Dashboard /wp-admin3,031 ▲1005.98 ▲0.07137.76 ▼5.23119.55 ▼6.22
Posts /wp-admin/edit.php2,803 ▲642.73 ▲0.0070.27 ▲6.4890.88 ▼0.21
Add New Post /wp-admin/post-new.php1,726 ▲11118.27 ▼3.16365.41 ▲88.79121.24 ▲18.66
Media Library /wp-admin/upload.php1,871 ▲645.06 ▲0.04167.19 ▲17.35123.00 ▲8.83
Job Posting /wp-admin/edit.php?post_type=civic-job-posting1,4702.6266.0776.29
Category /wp-admin/edit-tags.php?taxonomy=cjp_category&post_type=civic-job-posting1,8002.3861.6686.72
Add New Job Posting /wp-admin/post-new.php?post_type=civic-job-posting4,2278.66221.79156.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

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

SRP 50% 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
Almost there! Just fix the following items
  • 7658× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/civic-job-posting/admin/google-api-php-client-2.2.2/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/civic-job-posting/admin/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/ServiceUsage/Quota.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/civic-job-posting/admin/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/YouTubeReporting/ReportType.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/civic-job-posting/admin/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/Directory/UserOrganization.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/civic-job-posting/admin/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/CloudKMS/CryptoKey.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service_Resource' not found in wp-content/plugins/civic-job-posting/admin/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/Taskqueue/Resource/Taskqueues.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/civic-job-posting/admin/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/Vault/ListMattersResponse.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/civic-job-posting/admin/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/Tasks/TaskList.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/civic-job-posting/admin/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/Blogger/PostReplies.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/civic-job-posting/admin/google-api-php-client-2.2.2/vendor/google/apiclient-services/src/Google/Service/Dialogflow/GoogleCloudDialogflowV2beta1EventInput.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: jobs, job posting, google search jobs

civic-job-posting/civic-job-posting.php 92% from 13 tests

The primary PHP file in "Civic Job Posting" version 1.2.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 170 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected414,802 lines of code in 7,846 files:
LanguageFilesBlank linesComment linesLines of code
PHP7,79323,727238,398408,705
Markdown281,43104,624
JSON15001,113
CSS21610236
XML33043
YAML29038
JavaScript2102734
make1409

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 103)
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity1.75
▷ Minimum class complexity1.00
▷ Maximum class complexity626.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity103.00
Code structure
Namespaces38
Interfaces25
Traits5
Classes7,775
▷ Abstract classes100.13%
▷ Concrete classes7,76599.87%
▷ Final classes90.12%
Methods57,389
▷ Static methods1390.24%
▷ Public methods56,93299.20%
▷ Protected methods2050.36%
▷ Private methods2520.44%
Functions255
▷ Named functions7429.02%
▷ Anonymous functions18170.98%
Constants753
▷ Global constants233.05%
▷ Class constants73096.95%
▷ Public constants730100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin