84% gp-routing

Code Review | GP routing - WP compatible REST API

WordPress plugin GP routing - WP compatible REST API scored 84% from 54 tests.

About plugin

  • Plugin page: gp-routing
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Nov 27, 2015
  • Latest release: Nov 27, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: renemanqueros (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 613 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.13ms] Passed 4 tests

A check of server-side resources used by GP routing - WP compatible REST API
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.11 ▼9.60
Dashboard /wp-admin3.32 ▲0.0141.33 ▼5.53
Posts /wp-admin/edit.php3.37 ▲0.0148.26 ▲4.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.14 ▼9.54
Media Library /wp-admin/upload.php3.24 ▲0.0137.07 ▲5.64

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

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

Browser metrics Passed 4 tests

Checking browser requirements for GP routing - WP compatible REST API
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.60 ▼0.581.60 ▼0.1636.12 ▼10.04
Dashboard /wp-admin2,203 ▲124.85 ▼1.05115.61 ▲12.1143.91 ▼3.87
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0337.55 ▲0.5632.97 ▲0.49
Add New Post /wp-admin/post-new.php1,551 ▲1822.99 ▼0.28675.47 ▲33.9352.30 ▲0.39
Media Library /wp-admin/upload.php1,388 ▼34.21 ▼0.0198.74 ▲2.4842.15 ▼0.30

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gp-routing/index.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'app' not found in wp-content/plugins/gp-routing/routes/test.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: api, rest

gp-routing/index.php 92% from 13 tests

"GP routing - WP compatible REST API" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("gp-routing.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin179 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
Markdown132099
PHP2161080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
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