10% wrapper-for-workable-api

Code Review | Workable Api

WordPress plugin Workable Api scored10%from 54 tests.

About plugin

  • Plugin page: wrapper-for-worka...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2020
  • Latest release: Apr 6, 2022
  • Number of updates: 9
  • Update frequency: every 88.8 days
  • Top authors: miriamgoldman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,306 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/wrapper-for-workable-api/inc/classes/class-workable-api-wrapper.php+72
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.84MB] [CPU: ▼54.67ms] Passed 4 tests

A check of server-side resources used by Workable Api
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.325.93 ▼33.61
Dashboard /wp-admin2.16 ▼1.147.30 ▼44.38
Posts /wp-admin/edit.php2.16 ▼1.197.11 ▼41.56
Add New Post /wp-admin/post-new.php2.16 ▼3.726.10 ▼99.14
Media Library /wp-admin/upload.php2.16 ▼1.067.07 ▼30.55
Workable API /wp-admin/options-general.php?page=workable_api2.166.32

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Workable Api
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.38 ▼0.291.87 ▲0.0744.64 ▼1.40
Dashboard /wp-admin2,227 ▲395.98 ▲1.10106.96 ▲2.1439.15 ▼6.14
Posts /wp-admin/edit.php2,089 ▼02.76 ▲0.7140.44 ▲2.4831.34 ▼1.02
Add New Post /wp-admin/post-new.php1,527 ▲823.72 ▲0.61689.41 ▲19.2560.04 ▲1.18
Media Library /wp-admin/upload.php1,406 ▲155.26 ▲1.05114.59 ▲18.0144.79 ▼1.26
Workable API /wp-admin/options-general.php?page=workable_api8492.5033.2828.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wrapper-for-workable-api/inc/classes/class-workable-api-wrapper.php+72
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=workable_api
    • > Notice in wp-content/plugins/wrapper-for-workable-api/inc/classes/class-workable-api-wrapper.php+74
    Trying to access array offset on value of type bool

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wrapper-for-workable-api/inc/classes/class-workable-api.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wrapper-for-workable-api/tests/test-sample.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wrapper-for-workable-api/tests/bootstrap.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wrapper-for-workable-api/inc/classes/class-workable-api-admin.php:388

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=workable_api
    • > Network (severe)
    wp-content/plugins/wp-workable/inc/css/style.css?ver=1696843752 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=workable_api
    • > Network (severe)
    wp-content/plugins/wp-workable/inc/js/functionality.js?ver=1696843752 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: job listing, job board, jobs, careers, workable

wrapper-for-workable-api/workable-api.php 77% from 13 tests

The main PHP file in "Workable Api" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("wrapper-for-workable-api.php" instead of "workable-api.php")
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin782 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP8151535507
Bourne Shell12111120
JavaScript191287
CSS111168

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.17
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods2480.00%
▷ Protected methods13.33%
▷ Private methods516.67%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ 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 PNG file occupies 0.21MB with 0.12MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png218.20KB91.48KB▼ 58.07%