88% 1app-business-forms

Code Review | 1app Business Forms

WordPress plugin 1app Business Forms scored 88% from 54 tests.

About plugin

  • Plugin page: 1app-business-forms
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.2
  • WordPress version: 5.9.2
  • First release: Dec 16, 2021
  • Latest release: Feb 4, 2022
  • Number of updates: 10
  • Update frequency: every 5.3 days
  • Top authors: 1appdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 121 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.88MB] [CPU: ▼309.82ms] 75% from 4 tests

Server-side resources used by 1app Business Forms
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 710.46ms on /wp-admin/edit.php?post_type=1app_form&page=overview)
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0855.81 ▲6.38
Dashboard /wp-admin3.46 ▲0.0633.90 ▲0.86
Posts /wp-admin/edit.php3.69 ▲0.0538.45 ▲1.13
Add New Post /wp-admin/post-new.php3.27 ▼3.7029.99 ▼1,238.65
Media Library /wp-admin/upload.php3.35 ▲0.0524.19 ▼2.62
All Forms /wp-admin/edit.php?post_type=1app_form3.3927.85
Transactions /wp-admin/edit.php?post_type=1app_form&page=transactions3.33744.87
Add New /wp-admin/post-new.php?post_type=1app_form3.2726.31
Overview /wp-admin/edit.php?post_type=1app_form&page=overview3.33710.46

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: 1 new table, no new options
New tables
wp_oneapp_forms_payments

Browser metrics Passed 4 tests

1app Business Forms: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,858 ▲11416.14 ▲0.497.13 ▲1.572.50 ▲0.10
Dashboard /wp-admin2,945 ▲876.12 ▼0.05119.21 ▼15.17181.09 ▲25.34
Posts /wp-admin/edit.php2,745 ▲573.12 ▼0.1267.78 ▲4.59140.03 ▼2.12
Add New Post /wp-admin/post-new.php1,696 ▲2816.60 ▼1.53412.09 ▼3.47184.24 ▲27.66
Media Library /wp-admin/upload.php1,748 ▲535.55 ▲0.03122.68 ▼23.45197.31 ▲7.98
Settings /wp-admin/1app-page.php260.940.0320.13
All Forms /wp-admin/edit.php?post_type=1app_form1,4443.1666.36123.33
Transactions /wp-admin/edit.php?post_type=1app_form&page=transactions1,0832.4153.20102.36
Add New /wp-admin/post-new.php?post_type=1app_form1,9734.1076.21148.05
Overview /wp-admin/edit.php?post_type=1app_form&page=overview1,77811.24245.75156.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=1app_form
    • > Notice in wp-content/plugins/1app-business-forms/1app-page.php+648
    Undefined index: eventmeta_noncename

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/1app-page.php
    • > Network (severe)
    wp-admin/1app-page.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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 your attention:
  • Screenshots: Screenshot #1 (The screenshot-1 is the Settings page where you connect to or disconnect from your 1app business account.) image missing
Please take inspiration from this readme.txt

1app-business-forms/1app-page.php 92% from 13 tests

The principal PHP file in "1app Business Forms" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("1app-business-forms.php" instead of "1app-page.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,239 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33531361,182
CSS16053
JavaScript1104

PHP code Passed 2 tests

This is a very shot review of 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 complexity9.67
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1376.47%
▷ Protected methods00.00%
▷ Private methods423.53%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
1app.png2.33KB0.81KB▼ 65.09%