84% rest-client-tap

Code Review | Rest Client TAP

WordPress plugin Rest Client TAP scored84%from 54 tests.

About plugin

  • Plugin page: rest-client-tap
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8.1
  • WordPress version: 6.3.1
  • First release: Jan 27, 2018
  • Latest release: Nov 25, 2021
  • Number of updates: 27
  • Update frequency: every 51.9 days
  • Top authors: mrbrazzi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,549 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Rest Client TAP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.54 ▲4.40
Dashboard /wp-admin3.32 ▲0.0247.59 ▼2.33
Posts /wp-admin/edit.php3.37 ▲0.0243.11 ▼4.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.12 ▼11.33
Media Library /wp-admin/upload.php3.25 ▲0.0232.56 ▼2.63

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 9 new options
New WordPress options
TAP_DEPORTES
TAP_BOOKIES
TAP_COMPETICIONES
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Rest Client TAP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▲0.041.70 ▼0.3843.59 ▼0.92
Dashboard /wp-admin2,195 ▲155.54 ▼0.1184.59 ▼6.3338.28 ▼6.12
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0134.55 ▼5.3533.49 ▼3.29
Add New Post /wp-admin/post-new.php1,526 ▼023.55 ▲0.26668.31 ▼22.6653.39 ▼3.16
Media Library /wp-admin/upload.php1,400 ▲34.14 ▼0.0299.89 ▼5.0443.04 ▼3.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/rest-client-tap/admin/partials/rest-client-tap-admin-display.php
    • > /wp-content/plugins/rest-client-tap/public/partials/rest-client-tap-public-display.php

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 on the user side

Optimizations

Plugin configuration Passed 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
3 plugin tags: tipster, pick, api rest

rest-client-tap/rest-client-tap.php Passed 13 tests

The primary PHP file in "Rest Client TAP" version 1.1.8 is used by WordPress to initiate all plugin functionality
47 characters long description:
Rest client plugin to TodoApuestas API services

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin605 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12179600462
PO File23838137
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.14
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2676.47%
▷ Protected methods00.00%
▷ Private methods823.53%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected