90% wp-rest-api-v2-isfront

Code Review | WP API (V2) isFront

WordPress plugin WP API (V2) isFront scored 90% from 54 tests.

About plugin

  • Plugin page: wp-rest-api-v2-is...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 23, 2016
  • Latest release: Mar 25, 2016
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: oleg2tor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 819 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.01MB] [CPU: ▼3.28ms] Passed 4 tests

An overview of server-side resources used by WP API (V2) isFront
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.98 ▼6.24
Dashboard /wp-admin3.31 ▲0.0142.72 ▼7.02
Posts /wp-admin/edit.php3.36 ▲0.0046.29 ▼0.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.18 ▲0.21
Media Library /wp-admin/upload.php3.23 ▲0.0038.23 ▲4.29

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP API (V2) isFront
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.23 ▼1.444.80 ▲2.6641.41 ▼3.56
Dashboard /wp-admin2,206 ▲184.85 ▼0.04109.06 ▼13.0544.41 ▼1.01
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0141.06 ▲3.8435.26 ▲0.39
Add New Post /wp-admin/post-new.php1,542 ▲1418.45 ▼4.82637.73 ▼43.5660.05 ▼8.15
Media Library /wp-admin/upload.php1,391 ▼04.21 ▲0.04107.58 ▲2.7548.42 ▲2.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: json-rest-api, isfront, is-front, wp-rest-api, wp-api...

wp-rest-api-v2-isfront/wp-api-is-front.php 92% from 13 tests

This is the main PHP file of "WP API (V2) isFront" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-rest-api-v2-isfront.php" instead of "wp-api-is-front.php")

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 plugin19 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP192619

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin