84% happyr-api-client

Code Review | Happyr API Client

WordPress plugin Happyr API Client scored84%from 54 tests.

About plugin

  • Plugin page: happyr-api-client
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-3.5.1
  • WordPress version: 6.3.1
  • First release: May 12, 2013
  • Latest release: May 12, 2013
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: tnyholm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /753 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.71ms] Passed 4 tests

Server-side resources used by Happyr API Client
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.76 ▼3.67
Dashboard /wp-admin3.33 ▲0.0246.33 ▼4.16
Posts /wp-admin/edit.php3.38 ▲0.0245.55 ▼5.26
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.81 ▼13.74
Media Library /wp-admin/upload.php3.25 ▲0.0237.35 ▲1.67
HappyR API /wp-admin/options-general.php?page=happyr-api3.2230.71

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 10 new options
New WordPress options
happyr-api-version
happyr-api-token
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
happyr-api-endpoint
can_compress_scripts
happyr-api-username

Browser metrics Passed 4 tests

A check of browser resources used by Happyr API Client
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.59 ▼0.671.61 ▼0.2738.83 ▼1.35
Dashboard /wp-admin2,207 ▲225.84 ▲0.9596.47 ▼29.4037.84 ▼20.30
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0236.65 ▼5.4835.03 ▼4.28
Add New Post /wp-admin/post-new.php1,541 ▲2722.91 ▲5.29722.71 ▲57.5258.13 ▲3.00
Media Library /wp-admin/upload.php1,395 ▲44.15 ▼0.05111.24 ▲7.2847.71 ▲2.49
HappyR API /wp-admin/options-general.php?page=happyr-api8872.0222.0931.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 10 options
    • can_compress_scripts
    • happyr-api-version
    • happyr-api-username
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • happyr-api-endpoint
    • happyr-api-token

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 everything seems fine, this is not 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 take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/happyr-api-client/admin.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/happyr-api-client/admin.php:16
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/happyr-api-client/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/happyr-api-client/vendors-installed.php on line 7
    • > PHP Warning
      require_once(wp-content/plugins/happyr-api-client/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/happyr-api-client/vendors-installed.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: happyr, api client

happyr-api-client/happyr-api-client.php Passed 13 tests

"Happyr API Client" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
60 characters long description:
Imports a library to integrate with the happy recruiting api

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected198 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP44754144
CSS19645
JSON1209

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin