94% grape

Code Review | Grape

WordPress plugin Grape scored 94% from 54 tests.

About plugin

  • Plugin page: grape
  • Plugin version: 0.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.1-4.5
  • WordPress version: 5.8.1
  • First release: Feb 2, 2016
  • Latest release: Apr 29, 2016
  • Number of updates: 20
  • Update frequency: every 4.4 days
  • Top authors: sk7 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 528 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼141.18ms] Passed 4 tests

Server-side resources used by Grape
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.99 ▲0.2740.20 ▲17.99
Dashboard /wp-admin3.28 ▲0.2250.60 ▲0.98
Posts /wp-admin/edit.php3.33 ▲0.2240.22 ▼3.30
Add New Post /wp-admin/post-new.php5.57 ▲0.1494.74 ▼566.83
Media Library /wp-admin/upload.php3.16 ▲0.1635.08 ▲4.42
Grape /wp-admin/options-general.php?page=grape3.1333.11

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Grape
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,715 ▲11916.14 ▲0.638.66 ▼2.1649.93 ▼0.56
Dashboard /wp-admin2,980 ▲466.97 ▲1.01152.65 ▲5.23122.52 ▲1.34
Posts /wp-admin/edit.php2,749 ▲102.75 ▲0.0670.29 ▼4.3289.94 ▼5.48
Add New Post /wp-admin/post-new.php1,527 ▼15615.55 ▼3.21397.58 ▼1.15141.07 ▲26.72
Media Library /wp-admin/upload.php1,820 ▲135.53 ▲0.50142.49 ▼14.85131.70 ▼1.88
Grape /wp-admin/options-general.php?page=grape1,3362.8078.3573.87

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/grape/grape-options.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/grape/grape-options.php:55

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, 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
5 plugin tags: grape, grapeio, sync, chatgrapecom, chatgrape

grape/grape.php 92% from 13 tests

Analyzing the main PHP file in "Grape" version 0.3.4
You should first fix the following items:
  • Description: The plugin description must be longer than 10 characters (currently 0 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin4,507 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript27973973,581
PHP524899823
CSS2203103

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity11.60
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods43
▷ Static methods49.30%
▷ Public methods3581.40%
▷ Protected methods36.98%
▷ Private methods511.63%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin