84% genesis-rest-api-integration

Code Review | Genesis REST API Integration

WordPress plugin Genesis REST API Integration scored84%from 54 tests.

About plugin

  • Plugin page: genesis-rest-api-...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Jul 26, 2015
  • Latest release: Dec 7, 2015
  • Number of updates: 7
  • Update frequency: every 19.2 days
  • Top authors: Braad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,414 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.44ms] Passed 4 tests

Server-side resources used by Genesis REST API Integration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.20 ▼3.30
Dashboard /wp-admin3.32 ▼0.0248.96 ▼14.36
Posts /wp-admin/edit.php3.37 ▲0.0149.64 ▲1.11
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.58 ▼13.22
Media Library /wp-admin/upload.php3.24 ▲0.0140.91 ▲4.26

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Genesis REST API Integration: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.44 ▲0.071.92 ▲0.2341.11 ▲2.22
Dashboard /wp-admin2,221 ▲174.85 ▼0.08110.14 ▼11.4943.16 ▼6.21
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0240.83 ▲6.7033.86 ▼0.34
Add New Post /wp-admin/post-new.php1,545 ▼023.33 ▲0.01656.97 ▲56.7057.06 ▲1.03
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.00110.94 ▲8.3146.52 ▼0.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genesis-rest-api-integration/genesis-rest-api-integration.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: response, object, api, post, rest...

genesis-rest-api-integration/genesis-rest-api-integration.php 92% from 13 tests

The primary PHP file in "Genesis REST API Integration" version 1.1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin88 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1305588

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Constants1
▷ Global constants1100.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