68% my-simple-form

Code Review | My Simple Form

WordPress plugin My Simple Form scored68%from 54 tests.

About plugin

  • Plugin page: my-simple-form
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.4
  • WordPress version: 6.3.1
  • First release: Dec 17, 2015
  • Latest release: Jan 18, 2018
  • Number of updates: 11
  • Update frequency: every 69.5 days
  • Top authors: plance (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,134 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.27MB] [CPU: ▼1.97ms] Passed 4 tests

This is a short check of server-side resources used by My Simple Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1945.71 ▲6.49
Dashboard /wp-admin3.64 ▲0.3456.77 ▲8.08
Posts /wp-admin/edit.php3.70 ▲0.3450.26 ▼9.16
Add New Post /wp-admin/post-new.php6.16 ▲0.2899.17 ▼7.77
Media Library /wp-admin/upload.php3.50 ▲0.2841.37 ▲2.56
Applications /wp-admin/admin.php?page=plance-msf-controller-admin-user3.4839.88
Notification /wp-admin/admin.php?page=plance-msf-controller-admin-notification3.5337.18
Configure fields /wp-admin/admin.php?page=plance-msf-controller-admin-config3.5534.04

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: 1 new table, 8 new options
New tables
wp_plance_msf_user
New WordPress options
can_compress_scripts
plance_msf_rows
widget_recent-posts
plance_msf_notification
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

My Simple Form: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.30 ▼0.241.73 ▲0.0545.18 ▲3.92
Dashboard /wp-admin2,226 ▲465.66 ▲0.0288.81 ▼1.9246.98 ▲3.77
Posts /wp-admin/edit.php2,134 ▲342.00 ▼0.0134.55 ▼6.3530.82 ▼7.17
Add New Post /wp-admin/post-new.php1,569 ▲2422.08 ▼1.05673.51 ▼21.4454.69 ▼1.71
Media Library /wp-admin/upload.php1,428 ▲314.21 ▼0.09103.79 ▼4.2945.40 ▼0.75
Applications /wp-admin/admin.php?page=plance-msf-controller-admin-user1,2002.0528.5034.15
Notification /wp-admin/admin.php?page=plance-msf-controller-admin-notification1,0032.1522.8933.78
Configure fields /wp-admin/admin.php?page=plance-msf-controller-admin-config1,5932.1623.9936.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/my-simple-form/app/db.php+125
    rmdir(wp-content/plugins/my-simple-form/../../uploads/my-simple-form/): Directory not empty
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/my-simple-form/my-simple-form.php
    • > /wp-content/plugins/my-simple-form/app/db.php
    • > /wp-content/plugins/my-simple-form/vendor/kohana/kohana.php
    • > /wp-content/plugins/my-simple-form/vendor/kohana/kohana/exception.php
    • > /wp-content/plugins/my-simple-form/vendor/kohana/upload.php
    • > /wp-content/plugins/my-simple-form/app/helper/table/User.php
    • > /wp-content/plugins/my-simple-form/vendor/kohana/kohana/upload.php
    • > /wp-content/plugins/my-simple-form/vendor/kohana/kohana/core.php
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: data_ar in wp-content/plugins/my-simple-form/app/view/admin/user/view.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Plance_Controller' not found in wp-content/plugins/my-simple-form/app/controller/admin/Config.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/my-simple-form/app/view/admin/user/view.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/my-simple-form/app/view/admin/notification/form.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Plance_Controller' not found in wp-content/plugins/my-simple-form/app/controller/admin/Notification.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Plance_Flash' not found in wp-content/plugins/my-simple-form/app/view/index/form.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/my-simple-form/app/view/admin/user/view.php on line 2
    • > PHP Notice
      Undefined variable: data_ar in wp-content/plugins/my-simple-form/app/view/admin/user/view.php on line 2
    • > PHP Notice
      Undefined variable: data_ar in wp-content/plugins/my-simple-form/app/view/admin/user/view.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/my-simple-form/app/view/admin/config/form.php:2

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: purchase, donations, form, credit, job

my-simple-form/my-simple-form.php Passed 13 tests

Analyzing the main PHP file in "My Simple Form" version 1.1
64 characters long description:
Simple plugin for form on job, purchase, donations, credit, etc.

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
No dangerous file extensions were detected2,375 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP292966072,151
PO File1120154224

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity10.32
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods99
▷ Static methods4040.40%
▷ Public methods8989.90%
▷ Protected methods11.01%
▷ Private methods99.09%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.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 images were found in this plugin