84% one-call

Code Review | One Call - WP REST API Extension

WordPress plugin One Call - WP REST API Extension scored 84% from 54 tests.

About plugin

  • Plugin page: one-call
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 5.8.1
  • First release: Dec 18, 2017
  • Latest release: Jan 20, 2019
  • Number of updates: 7
  • Update frequency: every 57.6 days
  • Top authors: amadercode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 559 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.06MB] [CPU: ▼151.11ms] Passed 4 tests

An overview of server-side resources used by One Call - WP REST API Extension
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0536.41 ▲2.24
Dashboard /wp-admin3.12 ▲0.0754.55 ▲5.59
Posts /wp-admin/edit.php3.21 ▲0.1049.78 ▲14.15
Add New Post /wp-admin/post-new.php5.49 ▲0.0698.72 ▼608.60
Media Library /wp-admin/upload.php3.06 ▲0.0636.89 ▼3.65
One Call API Settings /wp-admin/options-general.php?page=ac-ocapi-settings3.0831.56

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 2 new options
New WordPress options
ac_ocapi_wp_defualt_filds
ac_ocapi_options

Browser metrics Passed 4 tests

A check of browser resources used by One Call - WP REST API Extension
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.90 ▲0.1311.12 ▲1.0249.00 ▲3.29
Dashboard /wp-admin2,974 ▲405.91 ▼0.33166.67 ▲15.44115.88 ▲1.10
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0064.26 ▲1.0189.89 ▲4.90
Add New Post /wp-admin/post-new.php1,597 ▼7518.78 ▲0.05417.52 ▲43.08108.26 ▼1.98
Media Library /wp-admin/upload.php1,830 ▲235.05 ▲0.03164.92 ▲15.59117.30 ▼2.29
One Call API Settings /wp-admin/options-general.php?page=ac-ocapi-settings1,7882.0958.8277.23

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
Please fix the following items
  • The uninstall procedure has failed, leaving 2 options in the database
    • ac_ocapi_options
    • ac_ocapi_wp_defualt_filds

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/one-call/ocapi-includes/ocapi-admin-page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

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
4 plugin tags: wpi rest api prefix, wp rest api all post fields details, wp rest api filter fields, wp rest api featured image

one-call/one-call.php 92% from 13 tests

Analyzing the main PHP file in "One Call - WP REST API Extension" version 1.1.1
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 159 characters long)

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
Good job! No executable or dangerous file extensions detected396 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP454108394
JavaScript1012
CSS1010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity15.67
▷ Minimum class complexity5.00
▷ Maximum class complexity33.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods20
▷ Static methods210.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin