78% otys-jobs-apply

Code Review | OTYS Plugin

WordPress plugin OTYS Plugin scored78%from 54 tests.

About plugin

  • Plugin page: otys-jobs-apply
  • Plugin version: 2.0.22
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 27, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 152
  • Update frequency: every 3.2 days
  • Top authors: otysplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,705 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.89MB] [CPU: ▲7.70ms] Passed 4 tests

This is a short check of server-side resources used by OTYS Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.27 ▲0.8144.63 ▲5.47
Dashboard /wp-admin4.22 ▲0.9252.47 ▲5.50
Posts /wp-admin/edit.php4.33 ▲0.9756.07 ▲11.14
Add New Post /wp-admin/post-new.php6.81 ▲0.93100.11 ▲8.70
Media Library /wp-admin/upload.php4.15 ▲0.9247.29 ▲13.07
Instructions /wp-admin/admin.php?page=otys_instructions4.1140.28
Settings 1 /wp-admin/admin.php?page=otys_settings4.1445.61
API Logs /wp-admin/admin.php?page=otys_logs4.1542.89
Cache /wp-admin/admin.php?page=otys_cache4.1748.12

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 498 new files
Database: 1 new table, 16 new options
New tables
wp_otys_log
New WordPress options
theysaidso_admin_options
otys_option_created_standard_documents
can_compress_scripts
otys_option_website
widget_recent-comments
otys_option_is_production_website
otys_option_vacancies_per_page
widget_recent-posts
widget_theysaidso_widget
otys_option_vacancies_options_sorting
...

Browser metrics Passed 4 tests

An overview of browser requirements for OTYS Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲15014.62 ▲0.051.76 ▲0.0137.92 ▼6.42
Dashboard /wp-admin2,271 ▲906.37 ▲0.7896.84 ▼5.5261.74 ▲18.28
Posts /wp-admin/edit.php2,332 ▲2323.26 ▲1.3253.71 ▲11.4051.09 ▲13.03
Add New Post /wp-admin/post-new.php1,581 ▲4223.16 ▼0.05755.82 ▲104.1336.60 ▼21.74
Media Library /wp-admin/upload.php1,623 ▲2265.19 ▲1.00109.86 ▲11.2588.91 ▲46.92
Instructions /wp-admin/admin.php?page=otys_instructions1,67213.61184.9259.90
Settings 1 /wp-admin/admin.php?page=otys_settings1,3325.1471.0679.78
API Logs /wp-admin/admin.php?page=otys_logs1,0573.0239.9954.27
Cache /wp-admin/admin.php?page=otys_cache1,0963.0738.6830.20

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • otys_plugin_version
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/otys-jobs-apply/app/views/vacancies/google-for-jobs.php
    • > /wp-content/plugins/otys-jobs-apply/otys-jobs-apply.php
    • > /wp-content/plugins/otys-jobs-apply/app/views/admin/admin-instructions/admin-instructions.php
    • > /wp-content/plugins/otys-jobs-apply/index.php
    • > /wp-content/plugins/otys-jobs-apply/app/views/admin/errors/error-default.php
    • > /wp-content/plugins/otys-jobs-apply/app/views/vacancies/vacancies-selected-filtes.php
  • 109× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Otys\\OtysPlugin\\Models\\BaseModel' not found in wp-content/plugins/otys-jobs-apply/app/Models/Pagination.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Otys\\OtysPlugin\\Models\\BaseModel' not found in wp-content/plugins/otys-jobs-apply/app/Models/MailModel.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_wp_error() in wp-content/plugins/otys-jobs-apply/app/views/admin/errors/error-load-template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/otys-jobs-apply/app/views/admin/admin-routes-settings/admin-routes-input.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/otys-jobs-apply/app/views/vacancies/apply/vacancies-confirm-email.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Otys\\OtysPlugin\\Includes\\Core\\Base' not found in wp-content/plugins/otys-jobs-apply/app/Includes/Core/Data.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Otys\\OtysPlugin\\Controllers\\Shortcodes\\ShortcodeBaseController' not found in wp-content/plugins/otys-jobs-apply/app/Controllers/Shortcodes/VacanciesShortlistController.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/otys-jobs-apply/app/views/vacancies/preview-mode.php:18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/otys-jobs-apply/app/views/include-parts/rest-forms/field-multifile.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Otys\\OtysPlugin\\Controllers\\Shortcodes\\ShortcodeBaseController' not found in wp-content/plugins/otys-jobs-apply/app/Controllers/Shortcodes/VacanciesGeoSearchController.php:16

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 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:
  • License uri: Please fix this invalid url: "[http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)"
The official readme.txt is a good inspiration

otys-jobs-apply/otys-jobs-apply.php 92% from 13 tests

"OTYS Plugin" version 2.0.22's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.1" instead of "6.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected72,168 lines of code in 430 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1798,5792,09546,319
PHP1252,4123,93611,099
PO File51,6032,5674,127
JSON11003,952
TypeScript526684,0372,646
Sass2012911,803
CSS21363629
Markdown43170628
LESS71436415
JSX23713298
Svelte2320240
SVG20012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity19.29
▷ Minimum class complexity1.00
▷ Maximum class complexity137.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes70
▷ Abstract classes710.00%
▷ Concrete classes6390.00%
▷ Final classes1422.22%
Methods398
▷ Static methods25664.32%
▷ Public methods38797.24%
▷ Protected methods10.25%
▷ Private methods102.51%
Functions81
▷ Named functions11.23%
▷ Anonymous functions8098.77%
Constants17
▷ Global constants1482.35%
▷ Class constants317.65%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/vacancies/vacancy-detail-banner-ratio.png0.09KB0.09KB0.00%