10% myform-jp

Code Review | myform-jp

WordPress plugin myform-jp scored 10% from 54 tests.

About plugin

  • Plugin page: myform-jp
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9
  • WordPress version: 6.3.1
  • First release: Feb 13, 2018
  • Latest release: Apr 20, 2018
  • Number of updates: 11
  • Update frequency: every 6.0 days
  • Top authors: ta_terunuma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 809 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/myform-jp/myform-jp.php+36
    Use of undefined constant basedir - assumed 'basedir' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.93MB] [CPU: ▼48.89ms] Passed 4 tests

An overview of server-side resources used by myform-jp
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.76 ▼32.89
Dashboard /wp-admin2.08 ▼1.228.10 ▼37.03
Posts /wp-admin/edit.php2.08 ▼1.287.07 ▼38.96
Add New Post /wp-admin/post-new.php2.08 ▼3.815.37 ▼86.69
Media Library /wp-admin/upload.php2.08 ▼1.156.85 ▼26.89
定義済情報の取得 /wp-admin/admin.php?page=myformjp-gets2.086.47
環境定義[contact] /wp-admin/admin.php?page=myformjp-02.106.97

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 9 new options
New WordPress options
myformjp_mail
myformjp_define[contact]
db_upgraded
widget_recent-comments
can_compress_scripts
myformjp_params
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

myform-jp: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.21 ▼1.171.97 ▲0.2945.24 ▲7.22
Dashboard /wp-admin2,236 ▲444.83 ▼0.1298.02 ▼14.4742.49 ▲3.88
Posts /wp-admin/edit.php2,116 ▲242.01 ▼0.0339.70 ▲5.1243.21 ▲10.84
Add New Post /wp-admin/post-new.php1,555 ▲1823.21 ▲0.06665.32 ▼22.6063.87 ▼1.82
Media Library /wp-admin/upload.php1,412 ▲244.20 ▼0.01111.99 ▲6.5456.26 ▲11.10
定義済情報の取得 /wp-admin/admin.php?page=myformjp-gets7742.0323.3846.48
環境定義[contact] /wp-admin/admin.php?page=myformjp-01,0242.1623.0569.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/myform-jp/myform-jp.php+36
    Use of undefined constant basedir - assumed 'basedir' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • myformjp_define[contact]
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=myformjp-0
    • > Warning in wp-content/plugins/myform-jp/myform-jp.php+36
    Use of undefined constant basedir - assumed 'basedir' (this will throw an Error in a future version of PHP)
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=myformjp-0
    • > Notice in wp-content/plugins/myform-jp/include/myformjp_dsystem_class.php+22
    Undefined variable: dba
    • > GET request to /wp-admin/admin.php?page=myformjp-gets
    • > Warning in wp-content/plugins/myform-jp/admin.php+181
    copy(/pt1_simpty.sqlite3): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=myformjp-0
    • > Notice in wp-content/plugins/myform-jp/admin.php+141
    Undefined variable: pul

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

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (https://pierre-soft.com/myform/screenshot.png) image required
You can take inspiration from this readme.txt

myform-jp/myform-jp.php Passed 13 tests

"myform-jp" version 1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
49 characters long description:
This software is inquiry form for the individual.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected2,043 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP1879721,404
CSS1821410
JavaScript5116206
PO File13423

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity95.00
▷ Minimum class complexity22.00
▷ Maximum class complexity168.00
Average method complexity5.27
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods44
▷ Static methods00.00%
▷ Public methods44100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants22100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png8.03KB4.28KB▼ 46.62%