93% openinbound-for-wp

Code Review | OpenInbound

WordPress plugin OpenInbound scored 93% from 54 tests.

About plugin

  • Plugin page: openinbound-for-wp
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8
  • WordPress version: 5.8.1
  • First release: Jun 28, 2017
  • Latest release: Jun 28, 2017
  • Number of updates: 2
  • Update frequency: every 10.0 days
  • Top authors: openinbound (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 462 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.45MB] [CPU: ▼158.69ms] Passed 4 tests

An overview of server-side resources used by OpenInbound
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.1426.77 ▲5.66
Dashboard /wp-admin3.30 ▲0.2438.95 ▼3.26
Posts /wp-admin/edit.php3.34 ▲0.2339.63 ▲8.05
Add New Post /wp-admin/post-new.php3.08 ▼2.3627.58 ▼645.20
Media Library /wp-admin/upload.php3.18 ▲0.1833.08 ▲10.52
OpenInbound /wp-admin/options-general.php?page=openinbound3.1528.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for OpenInbound
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,671 ▲7015.90 ▼0.195.20 ▼1.7675.93 ▼3.23
Dashboard /wp-admin2,938 ▲436.08 ▼0.08114.64 ▼17.81168.33 ▼13.79
Posts /wp-admin/edit.php2,742 ▲23.23 ▲0.0070.68 ▲7.35193.02 ▲60.27
Add New Post /wp-admin/post-new.php3,701 ▼4018.48 ▼0.10423.79 ▼2.80162.13 ▲1.02
Media Library /wp-admin/upload.php1,754 ▲55.50 ▼0.00142.40 ▼3.94190.73 ▲7.34
OpenInbound /wp-admin/options-general.php?page=openinbound1,0762.4154.13140.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'Required\\OpenInbound\\FormInterface' not found in wp-content/plugins/openinbound-for-wp/classes/FormAbstract.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Required\\OpenInbound\\add_action() in wp-content/plugins/openinbound-for-wp/init.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Required\\OpenInbound\\FormAbstract' not found in wp-content/plugins/openinbound-for-wp/classes/ContactForm7.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GFFeedAddOn' not found in wp-content/plugins/openinbound-for-wp/classes/GravityFormsFeed.php:18

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 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
The official readme.txt might help

openinbound-for-wp/openinbound.php 85% from 13 tests

"OpenInbound" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("openinbound-for-wp.php" instead of "openinbound.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin1,220 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP172427141,009
JSON300120
Markdown222091

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.60
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
Methods80
▷ Static methods67.50%
▷ Public methods7593.75%
▷ Protected methods45.00%
▷ Private methods11.25%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin