10% wp-careerjet-shortcode

Code Review | WP Careerjet Shortcode

WordPress plugin WP Careerjet Shortcode scored10%from 54 tests.

About plugin

  • Plugin page: wp-careerjet-shor...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7.5
  • WordPress version: 6.3.1
  • First release: May 17, 2017
  • Latest release: May 17, 2017
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: unifiedac (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,228 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Parse error in wp-content/plugins/wp-careerjet-shortcode/wpcj.php+191
    syntax error, unexpected 'public' (T_PUBLIC)

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

This is a short check of server-side resources used by WP Careerjet Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.11 ▲4.50
Dashboard /wp-admin3.31 ▼0.0443.75 ▼12.02
Posts /wp-admin/edit.php3.36 ▲0.0046.13 ▼1.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.40 ▼26.14
Media Library /wp-admin/upload.php3.23 ▲0.0033.62 ▲0.75

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Careerjet Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.071.88 ▲0.0942.59 ▼4.63
Dashboard /wp-admin2,209 ▲245.86 ▼0.0497.68 ▼4.9039.99 ▼1.19
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0138.21 ▼5.1033.57 ▼3.07
Add New Post /wp-admin/post-new.php1,534 ▲1523.19 ▼0.05658.01 ▼20.3751.74 ▲3.34
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.00104.38 ▼4.1543.35 ▼3.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Parse error
      syntax error, unexpected 'public' (T_PUBLIC) in wp-content/plugins/wp-careerjet-shortcode/wpcj.php on line 191
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-careerjet-shortcode/wpcj-create-shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-careerjet-shortcode/wpcj-jobs-shortcode.php:256
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-careerjet-shortcode/wpcj-how-to.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-careerjet-shortcode/wpcj-searchbox-shortcode.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: job listing, affiliate jobs, careerjet, jobs, shortcode...

wp-careerjet-shortcode/wpcj.php 92% from 13 tests

The primary PHP file in "WP Careerjet Shortcode" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-careerjet-shortcode.php" instead of "wpcj.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
Success! There were no dangerous files found in this plugin3,969 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP6229302887
CSS32812314
JavaScript324097

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/search-box.png8.15KB4.45KB▼ 45.40%
img/wp-careerjet-logo.png13.47KB7.01KB▼ 47.95%
img/job-listing.png7.75KB4.84KB▼ 37.48%